I would like to find all possible reverse dependencies (no need for recursive reverse dependencies) of a certain package p, that is, I want to find all packages which depend on p. This shall include reverse dependencies on p's source package and also reverse build dependencies.

If I understand it correctly, there are 4 types of reverse dependencies:

  1. r depends on p
  2. r depends on source package of p
  3. Building r requires p
  4. Building r requires the source package of p

I would like to find all of them.

For Debian, there is apt-rdepends -r but the manual says:

 apt-rdepends cannot do reverse build-dependencies.

For Ubuntu, there is reverse-depends, which seems to let me do what I want but it seems to be Ubuntu specific, as the manual pages states it is

Provided by: ubuntu-dev-tools_0.153_all

Are there reverse-depends-like tools which will work for non-Ubuntu distributions, especially those using deb and rpm packages?


In Debian and derivatives there are six types of dependencies:

  • pre-depends
  • depends
  • recommends
  • suggests
  • build-depends
  • build-depends-indep

Each of these give corresponding reverse dependencies. To list them you can use grep-dctrl:

grep-dctrl -FBuild-Depends mypackage -w -sPackage /var/lib/apt/lists/*Sources

will list all the packages which build-depend on mypackage, i.e. mypackage's non-recursive reverse build-dependencies.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.