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:
rdepends onprdepends on source package ofp- Building
rrequiresp - Building
rrequires the source package ofp
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?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
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.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0