Datasheet

77
Chapter 4 Software Management
apt-get, however, is just one part of the apt family. apt-cache, for example,
is the
apt family’s command-line search and display tool. apt-cache shares
the same advantages as
apt-get, namely simplicity and ease of use. apt-
setup
, which was mentioned above, is yet another in the family of apt tools.
aptitude aptitude is a fullscreen console-based package management
front end browser. It’s based on the
apt libraries, meaning that the functional-
ity provided by the
apt family of command-line tools is available within apti-
tude.
aptitudes strengths lie in its presentation of the data. With so many
components in the distribution, it can be a bit difficult to find exactly what you
want. Even examining your current system can be a chore. With
aptitude,
you can “drill down” through the various levels of the system, quickly collect-
ing whatever data you need.
A special feature specific to aptitude and the reason why I recommend its
use is its ability to track packages that were installed automatically. As an
example, say you install package
foo. During foos installation, the library
bar was installed automatically to satisfy foo’s dependencies. When you
remove package
foo, library bar will be removed as well, so long as no other
package still depends on it.
aptitude can actually be used on the command-line as well, by providing the
same arguments you would give apt-get and apt-cache. So not only does
aptitude provide a fullscreen package browser that can often aid in your search-
ing and system examination, but it can also be used with the same simplicity as
apt-get and apt-cache with the added benefit of the tracking of automati-
cally installed packages.
dpkg At the bottom of the pile is dpkg, Debian’s basic package management
tool. Whenever
apt-get or aptitude install, remove, or otherwise operate
on a package, they’re calling
dpkg to do the heavy lifting. dpkg provides a
lower-level interface to the packaging system, allowing you to override partic-
ular behaviors. These low-level package operation interfaces should be used
only when you know exactly what you need to do, however, because making a
mistake with
dpkg might require some painful hand-editing of package
databases, which requires expert knowledge.
Finding and Examining Packages
One of the harder parts of dealing with a Debian system is finding the package you
want from among the many available. Though finding packages can be difficult, it
isn’t the only sort of information-gathering you’ll need to use routinely. You’ll also
need to list packages, list packaging details, determine which files belong to which
packages, and even occasionally view information about packages available in a dif-
ferent Debian tree than the one you use. This section covers these sorts of tasks.
Tip
09_576445 ch04.qxd 7/5/05 3:10 PM Page 77