Datasheet

82
Part I The Fundamentals
Don’t quit aptitude yet because we’ll examine the ed package in more detail later
in this chapter.
Showing package details
Of course, performing a package operation whether install, remove, purge, or
what have you may require that you understand what the package is and how it
works within the system as a whole. You can use
aptitude or apt-cache to see
the package details.
Using aptitude to show package details
Examining the package system in detail is where aptitude can really shine. Any
place where a package name is displayed by
aptitude, you can press Enter to view
that package’s details. Using the example from the previous section, highlight
ed
and press Enter. You’re now presented with a new screen detailing all sorts of infor-
mation about the package. Wherever you can highlight a line that starts with three
dashes, you can press Enter to expand the tree and get more information. Go ahead
and expand the
Packages which depend on ed tree. Use the down-arrow key to
scroll down, and you can see all the packages that use
ed in some way or another,
as well as their status (again, status is indicated in the first field). At the bottom of
this detailed package display, you can see all versions of the package that are avail-
able; sometimes the package has an upgrade available. You can press Enter on any
of those to view that version’s particular details.
Press the Q key to leave the package detail screen and return to the main screen. If
you decided to explore a bit and view other packages’ details, just keep pressing Q
until you’re back at the main screen. Then press Q one last time to quit, and con-
firm that you wish to quit.
Using apt-cache to show package details
Though I really love aptitude, it isn’t suitable for every purpose. For instance, the
fullscreen nature of the detail view can make it more difficult to use. It’s also darned
near impossible to use
aptitudes fullscreen display in a script to automatically
retrieve information. A good alternative utility is
apt-cache. Take a look at how
apt-cache displays the ed package’s details, using the apt-cache show command
followed by the package name:
user@hostname:~$ apt-cache show ed
Package: ed
Priority: important
Section: editors
Installed-Size: 144
Maintainer: James Troup <james@nocrew.org>
Architecture: i386
Version: 0.2-20
09_576445 ch04.qxd 7/5/05 3:10 PM Page 82