Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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

marked as duplicate by bodhi.zazen, RobotHumans, Eric Carvalho, Eliah Kagan, Tim Aug 12 '14 at 7:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Related:… – Seth Feb 26 '15 at 3:58
up vote 79 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. – RobotHumans 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. – RobotHumans Dec 22 '13 at 22:50
If you add --installed, the output is even useful for packages which can be used by many others: apt-cache rdepends --installed packagename – quazgar May 27 '14 at 22:08

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

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
apt-cache showpkg <pkgname> 


apt-cache showpkg lightdm
share|improve this answer

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