Celeb Glow
updates | April 01, 2026

How to list dependent packages (reverse dependencies)?

In order to research what caused the installation of a given package, I'd like to get a list of packages which depend on that package. I couldn't find anything obvious in man dpkg.

2

7 Answers

apt-cache rdepends packagename should do what you want

12

aptitude has a fairly nice way of handling this:

$ aptitude why bash
i foomatic-filters PreDepends bash (>= 2.05)

By default, it only lists the "most installed, strongest, tightest, shortest" reason, but you can use aptitude -v why to make it output everything it finds.

7
apt-cache showpkg <pkgname> 

Example:

apt-cache showpkg lightdm
2

The simplest option is still:

apt rdepends package-name

which does not require you to install any package.

4

There is more than one way, with each method showing a different output.

For a detailed view of the full reverse dependency tree;

aptitude install apt-rdepends
apt-rdepends -r bash

Alternatively;

apt-cache showpkg bash

Or a concise list:

apt-cache rdepends bash
4

In addition to other good answers, an apt/apt-get -s does a "simulated" removal (or install).

sudo apt -s remove <pkgname>

Using -s or --simulate to remove (or install) packages, will normally list any dependencies affected. It will show orphaned packages when removing, or needed dependencies when installing, without actually executing the install or remove. Informational only.

2

With the reverse-depends command from the package: ubuntu-dev-tools

reverse-depends libjs-openlayers
# For build depends search
reverse-depends -b libjs-openlayers
Reverse-Recommends
* gis-osm
Reverse-Depends
* cyclograph
* phpmyadmin
* sumo-tools
Packages without architectures listed are reverse-dependencies in: amd64, arm64, armhf, i386, ppc64el, s390x

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy