Practical Package Administration under Debian

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Finding New Software

Everybody likes improvements and fresher software. apt-get takes care of this preference with the sub-command upgrade and the -u (short for --show-upgraded ) and -s (short for --simulate ) options. The program executes all of the packages with new versions. You can use the -s switch to check what occurs when the new version is installed (Listing 12).

Listing 12

apt-get upgrade

# apt-get upgrade -u -s
Reading package lists...
Building dependency tree....
Reading in status information....
The following packages are being updated (Upgrade):
 icedove libc-bin libc-dev-bin libc6 libc6-dev libc6-i686 libnss3 libnss3-1d
 linux-headers-3.2.0-4-686-pae linux-headers-3.2.0-4-common
 linux-image-3.2.0-4-686-pae linux-libc-dev virtualbox-guest-source
 virtualbox-ose virtualbox-ose-dkms virtualbox-ose-guest-source
 virtualbox-ose-guest-utils virtualbox-ose-source virtualbox-source
19 updated, 0 newly installed, 0 to remove and 0 not updated.
Inst libc-bin [2.13-38+deb7u1] (2.13-38+deb7u4 Debian-Security:7.0/stable [i386]) [libc6:i386 ]
Conf libc-bin (2.13-38+deb7u4 Debian-Security:7.0/stable [i386]) [libc6:i386 ]
[...]

Alternatively, you can do the same thing with APT and show versions using aptitude search '~U' or – starting with Debian 8 "jessie" – also apt-list .

Up to this point, the process still does not make clear where the package administration actually gets the package. You can figure this out by calling apt-cache policy and apt-cache madison . Listing 13 shows the apt-cache policy and combines the installation status and the located source for the kteatime package. The package that has not yet been installed was transferred from the main distribution area of the German Debian FTP server.

Listing 13

apt-cache policy

$ apt-cache policy kteatime
kteatime:
 Installed: (none)
 Installation Candidate: 4:4.12.4-1
 Versions table:
 4:4.12.4-1 0
 500 http://ftp.de.debian.org/debian/ jessie/main amd64 Packages

Unlike the above, the sub-command madison browses through all of the existing versions of a package. Listing 14 shows this for the kteatime package where binary and source packages are available.

Listing 14

apt-cache madison

$ apt-cache madison kteatime
 kteatime | 4:4.12.4-1 | http://ftp.de.debian.org/debian/ jessie/main amd64 Packages
 kteatime | 4:4.12.4-1 | http://ftp.de.debian.org/debian/ jessie/main Sources

Names and Package Description

In addition to the command-line tools (apt , apt-get , apt-cache , aptitude , wajig , and cupt ) and the graphical tools (Synaptic, Muon [6], SmartPM [7], and Apper), searches for software packages and files can also be performed via the web browser. The website for the Debian project [8] (Figure 1) and the APT Browse website [9] (Figure 2) are reliable sources with a wide variety of search possibilities.

Figure 1: Searching for a package on the Debian project website…
Figure 2: … and on the APT Browse website.

Buy this article as PDF

Express-Checkout as PDF

Pages: 7

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