How to see which package depends on the lib?
Solution 1:
You can use the apt-rdepends
package, available from the Universe repository on Ubuntu. Install it via:
sudo apt install apt-rdepends
To check the reverse dependencies on a specific package or library (runtime or development packages), you may invoke the command as such:
apt-rdepends -r package_name
More documentation on the same can be viewed on the manpage here.
If you require a dependency graph output viewable via the dot application, you may also use the debtree
package, installed via:
sudo apt install debtree
Via the arguments --show-rdeps
, equivalent to -R
, as documented in the man pages.
A few examples:
- Create a .dot file (a directed graph drawing):
debtree --show-rdeps package_name >out.dot
- Create a graph (PNG) from a .dot file:
dot -T png -o out.png out.dot
- Create a graph (Postscript) and view it using Okular:
debtree package_name | dot -Tps | okular - &