Comparing the apt-get and aptitude package tools

Slashdot it! Delicious Share on Facebook Tweet! Digg!
Lead Image © Julien Tromeur, 123RF.com

Lead Image © Julien Tromeur, 123RF.com

Dynamic Duo

,

The apt-get and aptitude package managers are part of the Debian standard repertoire. Which one works best for you?

The Ubuntu Software Center is only one of many package management tools used on Debian-based Linux systems. Although users have the choice of many worthy GUI alternatives, experienced users often prefer to work from the command line.

Apt-get and aptitude are a pair of command-line package management tools for the Debian environment. Although these tools might seem very similar, they use different approaches for managing software packages. Whereas apt-get executes the input commands exactly, aptitude has a memory and autocompletes them. Aptitude also provides a powerful interactive interface in text mode. Apt-get, however, is usually the faster of the two.

Behind the Scenes

The fundamental tools for software packaging on Debian-based system are dpkg and apt. Dpkg, the lowest level of package management for Debian, is responsible for unpacking DEB packages and handling updated configuration files. It also prevents one package from unexpectedly overwriting a file of another package.

Apt takes care of everything dealing with package lists and their evaluation – for example, downloading package lists, automatically resolving package requirements, and downloading the package files themselves. Apt thus consists of several components, on one hand, the two program libraries libapt-pkg and libapt-inst , and on the other, various command-line tools, including apt-get and apt-cache. All other programs, such as aptsh , aptitude , and synaptic are based on the APT program libraries. (One exception is cupt [1], which is why it's left out here.)

The developers of apt and aptitude are running a kind of race to see which of the two projects has fewer open error reports [2]. The projects currently are pretty much tied.

Differences

The most obvious difference between the two tools is, first of all, their manner of display. Apt, aptitude, and aptsh accept commands on the command line, although aptsh follows a slightly different concept. Aptitude also uses an ncurses-based text-mode user interface (Figure 1). You control complex actions with aptitude by using the text-mode interface or through call parameters.

Figure 1: Aptitude's text-mode interface shows a series of packages destined for upgrading.

For a short while, aptitude also had a GUI version based on the GIMP toolkit, but it never achieved the quality and stability of aptitude's ncurses interface and is, therefore, no longer being maintained [3]. The aptitude-qt Qt counterpart is in the sources too, but a viable version hasn't yet surfaced.

Synaptic also provides a graphical interface and is quite popular, along with Ubuntu's Software Center.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content