How to Check Package Dependencies with apt-rdepends on Ubuntu

Sponsored Link
apt-rdepends searches through the APT cache to find package dependencies. apt-rdepends knows how to emulate the result of calling apt-cache with both depends and dotty options.


By default, apt-rdepends shows a listing of each dependency a package has.It will also look at each of these fulfilling packages, and recursively lists their dependencies.

Install apt-rdepends in Ubuntu

sudo aptitude install apt-rdepends

This will install all the required packages.

Using apt-rdepends

apt-rdepends Syntax

sudo apt-rdepends [options] [pkgs ...]

apt-rdepends Examples

sudo apt-rdepends bash

Output looks like below

Reading package lists… Done
Building dependency tree… Done
bash
Depends: base-files (>= 2.1.12)
Depends: debianutils (>= 2.15)
PreDepends: libc6 (>= 2.3.6-6)
PreDepends: libncurses5 (>= 5.4-5)
base-files
Depends: awk
Depends: base-passwd (>= 2.0.3.4)

sudo apt-rdepends -d bash

Output Looks like below

Reading package lists… Done
Building dependency tree… Done
digraph packages {
concentrate=true;
size=”30,40?;
“bash” [shape=box];
“bash” -> “base-files”;
“bash” -> “debianutils”;
“bash” -> “libc6?[color=blue];
“bash” -> “libncurses5?[color=blue];
}

You can check man page for apt-rdepends from here

Sponsored Link

You may also like...

2 Responses

  1. Flimm says:

    That’s fascinating. It would be really interesting to see how many of those dependencies are installed by default in an Ubuntu installation.

  2. Mircea Vutcovici says:

    To make a graph:
    apt-rdepends -d bash|dot > rdep.dot ; dotty rdep.dot

Leave a Reply

Your email address will not be published. Required fields are marked *