It draws a pretty picture of your installed packages. Common uses include exploring dependency trees or finding hundreds of megs of useless packages.
To try it yourself, get the code, or install it with
pacman -S pacgraph. Run
pacgraph to generate an SVG. If Inkscape or imagemagick is installed it will also render a PNG. It might seem a little slow, but it's many times faster than Graphviz. Alternatively, run
pacgraph-tk to launch an interactive tk GUI.
Right now Arch is the best supported distro, but writing new loaders is pretty easy. Thanks to Carl Hamann, there is good support for Debian and Red Hat. Pacgraph also works in derivative distributions like Ubuntu or Fedora.
Stuff supported from the command line:
Slow computer, or you want exact numbers?
pacgraph -b "#808080" -l "#ffffff" -b --background -l --link -t --top -d --dep
Font size can be set with
pacgraph -p 10 100 where the first number is the smallest point size, and the second is the largest.
Interested in how one package fits into your system? Use --highlight (followed by three colors and the package name) to draw attention to its dependencies and inverse dependencies.
Distro is automatically detected but can be chosen through
--mode. Current supported options are
arch (which graphs your installed packages),
arch-repo (which graphs every official package in the repositories),
redhat. Currently there are no full repository loaders for debian or redhat. It also works with embedded Debian through mode
For an interactive graph explorer, launch
pacgraph-tk. Initially the graph will animate itself during the layout. Drag to pan, scroll to zoom. Hover a package to see its links. Type to search, matches will be highlighted.
pacgraph -help for the latest (sometimes experimental) options.
Arch-repo mode also lets you plot an arbitrary app's dependency trees. To generate the example shown, run
pacgraph -m arch-repo gimp. You may specify multiple package names, to see how their dependencies overlap.
Dependency chain compression requires a little explanation. C -> D -> E is a chain. These chains are very hard to draw, as there are a thousand wrong ways and only one good way. So pacgraph doesn't even try to tackle this hard problem, instead absorbing the dependencies into the parent. The graph generally looks prettier and easier to read if you compress the chains. More importantly, it makes the true size of programs much more apparent. Chain compression can be disabled in part (or entirely). Occasionally it is disabled automatically. For example, the illustration of Gimp would collapse into a single package (Gimp) if compression were not automatically disabled.
The cross platform support has been seeing more use. In case anyone wants to package it for a non-Arch distro, there are a few critical variables to set. In function
parse(), the first line sets
default_action. Right now this is
autodetect, but any
--mode option may be used, such as
redhat. For the interactive GUI (pacgraph-tk), it needs to know the exact path of the pacgraph source, for the
imp.load_source function. The default colors can also be set for both programs, to better match your theme.
For more info, check out the Arch forum thread or the github page.