Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is just for fun and curiosity: is there a tool using which I can visually see the dependencies of a package as a graph?

That is, the packages that a given package depends on. This can be a command-line tool that displays using ASCII graphics (like tree or Mercurial's graphlog) or a GUI tool that shows the dependency graph visually. Any other combination of tools that can show the dependencies visually works too.

share|improve this question
And what would the axes of the graph be? – user25656 Feb 27 '13 at 3:06
@vasa1: Vertices would be packages and edges are the dependencies. – Ashwin Nanjappa Feb 27 '13 at 4:35
up vote 19 down vote accepted


According to the application's website, the debtree package provides "package dependency graphs on steroids".

Note: This is also very useful when planning software upgrades. This application is able to graph dependencies against packages which have not yet been installed on your system.(it looks like it reads against the sources.list file and performs a live query)

The following diagram is an example of running debtree against the package dpkg. Here is a map of its dependencies:

To install debtree from the command line(Ctrl-Alt-t) enter the command:

sudo apt-get install debtree


  • Create a .dot file (a directed graph drawing - see the man dot manpage)
    • debtree --with-suggests <package> >
  • Create a graph (PNG) from a .dot file
    • dot -T png -o out.png
  • Create a graph (Postscript) and view it using Okular
    • debtree <package> | dot -Tps | okular - &

Be aware that when running this application against larger packages (i.e. gedit), the images can quickly become unwieldy and illegible.

Note that apt-rdepends can also be used in a similar manner, but piping output into a graphic is a bit more convoluted, in my opinion.

share|improve this answer
--no-skip or even --show-all are very useful options to include more packages like libc6. – logoff Jun 16 at 13:13

The command-line tool Apitude is a great tool for looking at dependencies. no fancy graphs, but it does give you a nice hierarchic representation of dependencies for a specific package.

share|improve this answer
Nathan Cazell: Could you elaborate how I can view this hierarchical graph for a given package? – Ashwin Nanjappa Mar 1 '13 at 3:25
when you open Aptitude just search for a package using / then hit enter for the package you want and it will show all the information about the package including a dependency tree with unmet dependencies and also conflicting packages. – Ntc Mar 2 '13 at 18:54
Nathan Cazell: Are you referring to the command-line aptitude tool? – Ashwin Nanjappa Mar 3 '13 at 7:25
Edited. Sorry for not clarifying earlier – Ntc Mar 4 '13 at 17:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.