Sunday, May 5, 2024
46
rated 0 times [  46] [ 0]  / answers: 1 / hits: 14297  / 3 Years ago, fri, october 15, 2021, 12:37:08

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.


More From » software-recommendation

 Answers
5

debtree


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. This will read from the sources.list file (usually located at /etc/apt/sources.list) and it will perform a live query using that list.


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 following command:


sudo apt-get install debtree

Usage



  • Create a .dot file (a directed graph drawing - see the man dot manpage):


      debtree --with-suggests <package> >out.dot


  • Create a graph (PNG) from a .dot file:


      dot -T png -o out.png out.dot


  • Create a graph (Postscript) and view it using Okular:


      debtree <package> | dot -Tps | okular - &



Be aware that when running this application against larger packages (e.g. 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.


See also:
Ubuntu debtree man page


[#32460] Saturday, October 16, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atereress

Total Points: 79
Total Questions: 106
Total Answers: 119

Location: Federated States of Micronesia
Member since Sun, May 16, 2021
3 Years ago
atereress questions
Wed, Aug 4, 21, 03:15, 3 Years ago
Sat, Apr 16, 22, 17:34, 2 Years ago
Thu, Dec 22, 22, 05:56, 1 Year ago
Sun, May 15, 22, 15:59, 2 Years ago
;