Reverse package dependency lookup in Debian/Ubuntu 2007-12-24

I stumbled over a neat tool call apt-rdepends today. It can list forward and reverse dependencies as well as generate dot graphs from that. Here are two little examples.

Recursive forward dependency lookup of package git-arch as graph:

apt-rdepends –-dotty git-arch | dot -Tpng > git_deps.png

The output looks like this:

Non-recursive reverse dependency lookup of package nano:

$ apt-rdepends –-reverse –-follow=nano nano
Reading package lists… Done
Building dependency tree
Reading state information… Done
Reverse Depends: junior-writing (1.5)
Reverse Depends: mindi (2.22-1ubuntu1)
Reverse Depends: ubuntu-standard (1.79)

Ian March 14th, 2010

This: apt-rdepends -reverse -dotty nautilus | dot -Tpng > git_deps.png

Gives this:
Unknown option: e
Unknown option: e

git_deps.png ends up being a 0B PNG with nothing in it.

sping March 15th, 2010

Right. It’s got to be “--” instead of “-“:

# apt-rdepends –-reverse –-follow=nano nano

WordPress converted “--” to a longer singel Dash, which I haven’t taken extra care of before.


Brett Alton October 6th, 2010

Such a neat bit of code!

Leave a Reply

You must be logged in to post a comment.