debtree - a useful tool for Debian and derivatives

Discussion in 'all things UNIX' started by tlu, Dec 7, 2011.

Thread Status:
Not open for further replies.
  1. tlu

    tlu Guest

    Has anybody tried debtree (available in Ubuntu from universe)? It's an interesting tool which visualizes package dependencies thus providing valuable insights. It's usage is shown on this site. You should also read its man page.

    Using it is relatively simple:

    debtree aptitude >

    creates a .dot file which can be transformed into a, e.g., png file with

    dot -Tpng -o aptitude.png

    or, in one step, simply by executing:

    debtree aptitude | dot -Tpng > aptitude.png

    The result looks like this.

    According to the man page the color of the arrows indicate the following:

    Build-Depends: dark gold, bold
    Build-Depends-Indep: light gold
    Pre-Depends: purple, bold
    Depends: blue
    Recommends: black
    Suggests: black, dotted
    Conflicts: red
    Provides: green, inverted arrow

    However, there a traps. Depending on the package the created png file can grow extremely large. For example, I executed

    debtree --no-versions --no-alternatives songbird

    where the options already restrict the size of the output - but the png file was still 67 MB large! So it might be useful to use the options described in the man page like --max-depth=x if you're running into problems.
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.