Sample Header Ad - 728x90

How to get reverse dependencies in Debian package manager for installed packages

2 votes
1 answer
160 views
The typical way to get reverse dependencies in Debian or Debian based systems, is to either use apt-cache rdepends PackageName OR apt-cache showpkg PackageName There are two issues with this. Firstly it lists all the reverse dependencies of a package, regardless of whether the dependency is Depends, Suggests, Recommends. Secondly it does not check if the dependent package is already installed or not on the system. For example let us consider the package **graphviz**. Looking at its reverse dependencies we can see that there are packages like **gimp** and **qvge**(i.e. Qt Visual Graph Editor) which depend on **graphviz**. i.e. without **graphviz** installed on the system these cannot work. However there are also packages which only suggest or recommends **graphviz** to be installed like **travis** (i.e. trajectory analyzer and visualizer), **webdruid** and others. These packages do not require **graphviz** to be installed. Rather they will function just fine without **graphviz**. So how is it possible to find the reverse dependencies of a package in which the type of dependency is "Depends", not Suggests nor Recommends and also to list only those packages which are installed? Taking the above example how is it possible to list only gimp, qvge, plus other packages for graphviz while omit packages like travis and webdruid?
Asked by KDM (116 rep)
Jan 22, 2025, 08:11 AM
Last activity: Jan 22, 2025, 10:08 AM