MDLog:/sysadmin

The Journal Of A Linux Sysadmin

Debian Tools: Apt-show-versions

| Comments

I often want to see what packages I have installed on a debian system. Also I like to see what are the upgrades available. This can be achieved with apt-show-versions that does them both: list all the packages installed and their respective version and also it can show what are the upgrades available and their version.

apt-show-versions is not automatically installed so we have to install it first:

aptitude install apt-show-versions

Now, if I want to see all the packages installed and their version I will run it without any parameter (maybe you will want to pipe the command with more or output it to a file as the list will be probably quite large):

apt-show-versions |more
php4-gd/stable uptodate 4:4.3.10-16
groff-base/etch uptodate 1.18.1.1-12
m4/etch uptodate 1.4.4-1
libmysqlclient15off/etch uptodate 5.0.20-1
ncftp/etch uptodate 2:3.1.9-1
...

As you can see the list is not sorted so maybe it will be useful to sort the output:

apt-show-versions |sort |more
acpid/etch uptodate 1.0.4-5
adduser/etch uptodate 3.87
apache2-common/etch uptodate 2.0.55-4
apache2-mpm-prefork/etch uptodate 2.0.55-4
apache2-prefork-dev/etch uptodate 2.0.55-4
apache2-utils/etch uptodate 2.0.55-4
apt/etch uptodate 0.6.43.3
...

If I want to see the available upgrades I will have to just include the -u parameter:

apt-show-versions -u
php4-pgsql/etch upgradeable from 3:4.3.10-4 to 4:4.4.2-1+b1
php4-interbase/etch upgradeable from 4.3.10-2 to 4:5.1.2-1
php4-imagick/etch upgradeable from 0.9.11-0.2 to 4:0.9.11+1-2
...

Comments