How to list dependent packages (reverse dependencies)?

In order to research what caused the installation of a given package, I'd like to get a list of packages which depend on that package. I couldn't find anything obvious in man dpkg.


Solution 1:

apt-cache rdepends packagename should do what you want

Solution 2:

aptitude has a fairly nice way of handling this:

$ aptitude why bash
i   foomatic-filters PreDepends bash (>= 2.05)

By default, it only lists the "most installed, strongest, tightest, shortest" reason, but you can use aptitude -v why to make it output everything it finds.

Solution 3:

apt-cache showpkg <pkgname> 

Example:

apt-cache showpkg lightdm

Solution 4:

The simplest option is still:

apt rdepends package-name

which does not require you to install any package.