debtree — package dependency graphs on steroids

Introduction

Advanced usage examples

  1. Create a build dependency graph
  2. Visualize what would happen when installing a package
  3. Dependencies on virtual packages
  4. Reverse dependencies

This example shows a basic build dependency graph for dpkg. Alternatives and Suggests are suppressed by default and Recommends and Conflicts have been suppressed using command line options. This graph represents what gets installed on a buildd when dpkg is built.

The --show-all option could have been used to also show dependencies on packages like libc6. In this case the resulting graph is still manageable.

In this case only Build-Depends are shown. If present, Build-Depends-Indep are indicated by lines that are thinner and a bit lighter in color.

By default the graph is generated for the architecture on which it is generated. In that case the "arch conditions" for the build dependency on libselinux1-dev would not have been displayed. They are in this graph because of the arch=all option. If the graph had been generated on a system running hurd-i386, the dependency on libselinux1-dev would not have been shown at all.

Note that if you generate a graph for an architecture other than your system's, the dependency information for some packages may not be available. These packages will get a reddish shade.

If you'd like to see what you need to install on your own system to build a package, use the -I option. In that case alternatives will not be automatically suppressed.

For a nice, though somewhat extreme, example of a graph showing architecture conditions, give this a try:

$ debtree -b --arch=all --no-recommends --no-conflicts debian-installer

$ debtree -b --arch=all --no-recommends --no-conflicts dpkg


Build dependency graph for dpkg
Generated .dot file: DOT
Full-sized images: PS | PNG | SVG