debtree — package dependency graphs on steroids

Introduction

Example: debconf

  1. Graph from apt-cache (for comparison)
  2. Basic graph (only hard dependencies and conflicts)
  3. Basic graph with Recommends
  4. Basic graph with Recommends and Suggests
  5. Basic graph with Recommends and showing alternatives
  6. Default graph (showing Recommends, alternatives and versions)
  7. Default graph with Suggests
  8. Default graph with Suggests and versioned Conflicts
  9. Default graph (rotated)

Note the nice relationships around whiptail etc. with again the Suggests a single arrow, but the Conflicts and Provides showing the correct individual relationships.

The versioned conflicts from perl-base are hard to miss...

This graph could be extended even further. The no-skip and show-all options can be used to also show packages that by default are excluded or for which the dependencies are not expanded. However, in a lot of cases this will only reduce the usability of the graph. (Although in the case of debconf the result with -S -VC --show-all is still quite nice.)

It is more likely that you'll want additional packages to be excluded or not expanded because the graph is too big or complex. The contents of a graph can be limited by:

  • including less information, for example by not showing recommended packages or conflicts, or using the show-installed option;
  • limiting the depth of the graph (note that with limit lower than 3 or 4 the result will probably not be very useful);
  • adding packages to one of the configuration files in /etc/debtree/;
  • some combination of these methods.

Some packages, especially meta packages like kde, have such a large number of dependencies that it is almost impossible to produce a useful graph.

$ debtree --with-suggests --versioned-conflicts debconf


Dependency graph for debconf
Generated .dot file: DOT
Full-sized images: PS | PNG | SVG

Equivalent graph for aptitude