How do I find the reverse dependency of a package?

I was wondering if it was possible to check what package another package is a dependency of.

For example, jetty is mysteriously installed and running on my system and I’d like to check whether it is a dependency of something else.

Asked By: Magnus


You can use apt-cache rdepends --installed jetty to see what depends on jetty. This will show both depends & recommends, so you may want to check through the list of packages to see what the relationship is with jetty.

Answered By: ajmitch

If you open Synaptic and find the package, you can right click on it and select Properties.
Under the tab Dependencies you can see the packages that jetty depend on, and which packages is dependent on jetty (the dropdown list).

Answered By: LasseValentini

Go install apt-rdepends. It doesn’t only show immediate dependencies, but all the recursive ones, so will tend to give you a large output. So, use a pager as well.

  • To display recursive depends: $ apt-rdepends jetty | pager. Note that this will list exactly the same depends multiple times. Output of apt-rdepends 1.3.0 isn’t trivial for scripting as package name doesn’t appear along each line…
  • To display recursive reverse depends: $ apt-rdepends --reverse jetty | pager. Note that this will return all packages, not just installed…
Answered By: tshepang
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.