dpkg

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.

apt-pedia

Here is an incomplete and badly sorted list of the most useful combinations of apt/dpkg I have been using lately.
Please remember that those command lines which start with a # need root pemissions.