[buug] Debian(/Ubuntu/...) reverse dependencies?

Michael Paoli Michael.Paoli at cal.berkeley.edu
Thu Nov 20 13:41:13 PST 2014


Question came up at 2014-11-06 BUUG meeting, essentially, why for a
given Debian (or Debian-based) distribution, has a particular package
installed?  What depends upon it?

I did mention:
apt-cache rdepends
That's a fair start.
Checking a bit further, seems:
apt-cache --installed rdepends
or:
apt-cache --installed --no-recommends --no-suggests rdepends
would work very well, but alas, doesn't seem to work as well as one
might like.  Checking a wee bit further, there's also:
apt-cache also has command arguments:
dotty
xvcg
that could be quite useful.
There's also package:
apt-rdepends
Not standard/default part of the basic apt stuff itself, but available
package and quite handy.
So, with that, something like:
apt-rdepends --reverse --state-follow=Installed --state-show=Installed
appears quite useful ... but apt-rdepends also has some limitations,
etc.  Also, aptitude can be qutie handy, notably:
aptitude why
E.g. for a host that has a wiki (dokuwiki) which depends upon the
(apache2) web server, we have:
$ aptitude why apache2
i   wwwconfig-common Suggests apache2
$ aptitude why wwwconfig-common
i   javascript-common Depends wwwconfig-common
$ aptitude why javascript-common
i   dokuwiki Depends javascript-common
$
There's also debtree - somewhat similar to the dotty capability of
apt-cache.  Using debtree can produce nice pretty pictures 'n graphs,
e.g.:
$ debtree --show-installed --show-rdeps --max-depth=0 --no-recommends \
> apache2 | dot -Tpng | display - &




More information about the buug mailing list