1

I come with a question - how to check which package depends on a given lib? I don't mean apt show [lib] because that shows what dependencies are responsible for a particular lib. And I have a lib (after a system update) and I don't know which package depends on that lib and if I have anything to worry about/need to replace it.

System: Ubuntu 20.10

1 Answer 1

2

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:

  1. Create a .dot file (a directed graph drawing):

debtree --show-rdeps package_name >out.dot

  1. Create a graph (PNG) from a .dot file:

dot -T png -o out.png out.dot

  1. Create a graph (Postscript) and view it using Okular:

debtree package_name | dot -Tps | okular - &

1
  • 1
    rich answer, thanks!
    – TheTanadu
    Commented Dec 1, 2021 at 19:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .