Viewing dependencies graphically on apt based systems
In trying to figure out how to create packages for Nexenta, I felt the need at multiple times to view the entire tree of dependencies for a package. A little bit of googling and I found that it is pretty simple.
The apt-cache command can be used to view dependencies graphically.
You will need to have the graphviz package installed for this.
$apt-cache dotty packagename > /tmp/dotfile
$dot -Tgif -o packagename.gif /tmp/dotfile
The complete dependency tree for the package packagename will be displayed in the file generated.
From the apt-cache manpage:
“The resulting nodes will have several shapes; normal packages are boxes, pure provides are triangles, mixed provides are diamonds, missing packages are hexagons. Orange boxes mean recursion was stopped [leaf packages], blue lines are pre-depends, green lines are conflicts.”
An example for the hspell package:


Amit:
Good One.
August 19, 2008, 8:42 amBruno:
Any idea on how to hack this from RPM-based systems?
September 12, 2008, 9:06 amGénérer un graphique des dépendances « Biquet forever:
[...] Générer un graphique des dépendances Ici [...]
September 12, 2008, 6:26 pm