Sometimes, it can become quite a complicated task to make a package work on an Ubuntu machine. The reason for this is mostly associated with the requirement of installing a few package dependencies. In such a case, you are also likely to come across a pop-up dialog box, informing you that the package cannot be installed as the required package dependencies are not installed. apt-rdepends is a utility that performs recursive dependency listings of any Ubuntu and Debian packages. This tool searches for and lists all the package dependencies by looking through the APT cache.
You can install apt-rdepends by entering the following command in Terminal.
sudo apt-get install apt-rdepends
Now, to list the dependencies of a package, use the following command:
apt-rdepends “package name”
Note: The package name should be replaced by the name of the package, minus quotes (see below screenshot).
Similarly, to list the dependencies of compressed package, run the apt-rdepends command in the following format.
An example of the dependency listing that you will get in Terminal is as follows:
Reading package lists… Done
Building dependency tree
Reading state information… Done
PreDepends: libc6 (>= 2.8)
Depends: libc-bin (= 2.13-20ubuntu5)
For more information about apt-rdepends, check out the man page at Debian Admin.