Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
This seems to be a duplicate of this question. –  jarno Dec 22 '13 at 18:27
add comment

4 Answers 4

up vote 31 down vote accepted

apt-cache rdepends packagename should do what you want

share|improve this answer
Excellent! apt-cache rdepends tofrodos confirmed the suspicion that it was installed by another package (the obsoleted dos2unix). –  l0b0 Apr 30 '12 at 13:12
Good deal. I do wish there was a recursive option. Sadly there is not as far as I am aware. –  hbdgaf Apr 30 '12 at 13:27
As for today (apt version, there is --recurse option that works with rdepends. –  jarno Dec 22 '13 at 14:00
Thanks for the heads up. /me is even more pleased than he was. –  hbdgaf Dec 22 '13 at 22:50
@l0b0: btw, if you only needed to know if a package was installed automatically as a dependency - there is apt-mark showauto available –  zerkms Feb 3 at 21:24
show 1 more comment

aptitude has a fairly nice way of handling this:

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

It only lists one reason, but that's usually enough...

share|improve this answer
Seems like it considers only the installed packages, not everything available. And that was what I needed. –  Tuukka Mustonen Jul 25 '13 at 10:06
For that you want reverse-depends in ubuntu-dev-tools –  tumbleweed Jul 25 '13 at 11:38
How about debian? –  Tuukka Mustonen Jul 25 '13 at 12:08
ubuntu-dev-tools is in Debian –  tumbleweed Jul 26 '13 at 11:18
add comment

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

For a detailed view of the dependency tree; aptitude install apt-rdepends apt-rdepends bash


apt-cache showpkg bash

Or a concise list:

apt-cache rdepends bash

share|improve this answer
add comment
apt-cache showpkg <pkgname> 


apt-cache showpkg lightdm
share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.