aptitude

Reverse Dependence of a package

In Debian every package depends on others and thus every package has generally at least another one which depends on it. Every once in a while you could need to know why a given package is present in your Debian machine. Here is how:

Method 1: apt-cache
$ apt-cache rdepends package

Shows all the packages, no matter whether they are installed or not, which depends on package.

Method 2: aptitude

If you, like me, don’t use aptitude very often (i.e. never) you should first update its package db:

# aptitude update

Then:

$ aptitude search '~i~Dpackage'

This command shows all the installed packages which depend on package.

Suggestions for maintaining Debian

Since many people ask me about these, here's a quick post about some Debian stuff:

apt-get vs. aptitude - aptitude is, IMHO, more flexible, even if you don't want to use the interective client (aptitude update && aptitude upgrade also work). If you use apt-get and aptitude now tells you that you have some unused packages, you can fix that by making an aptitude install to those packages.

apt.conf - you can configure your debian box behaviour in a really flexible way. For instance, in this box I have this:

# cat /etc/apt/apt.conf
APT::Default-Release "stable";
APT::Cache-Limit 20000000;
Apt::Get::Purge;
Aptitude::Recommends-Important "true";
Aptitude::Suggests-Important "true";