Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

For a specific package, can I find out why it is installed?

So, can I see or it's manually installed, or that it is installed as a dependency of another package? Or that it is installed as part of the distro?

share|improve this question
This is related to (a part of) this question, see this answer for details. – koushik Oct 10 '10 at 14:34

4 Answers 4

up vote 49 down vote accepted

A quick solution is to enter the following command in a terminal:

aptitude why $package

Replace $package with the package's name, and you may need to install the aptitude package first.

The following command

apt-cache rdepends --installed $package

lists the other packages installed on your computer that depend directly on $package. You can add the --recurse option to list all packages that depend directly or indirectly on it.

share|improve this answer
Pity aptitude isn't included by default :( – badp Oct 10 '10 at 14:21
@badp thank you to point out. This is the bad new with maverick, only to save some space on the livecd iso image. But it is an invaluable tool, and i will not go without. – enzotib Oct 10 '10 at 14:31
apt-cache rdepends --recurse $package probably gives too many packages. I would add --installed option to restrict to installed packages. -i option restricts to pre-dependence and dependence related packages. But a package may be installed because it is recommended by another package. To include such recommendation relateded packages, I suppose this would give the right ones: apt-cache rdepends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --installed --recurse $package – jarno Dec 22 '13 at 18:20
slightly shorter equivalent of @jarno's incantation, assuming you're on bash or other shell with brace expansion: apt-cache rdepends --no-{suggests,conflicts,breaks,replaces,enhances} --installed --recurse $package – akavel Nov 2 at 10:59

Yes, you can, and it's a pretty obvious command, in fact. Assuming you've aptitude installed, you can open up a Terminal Window ad type:

aptitude why package

That should give a list of packages that depend on that specific package. If it's a manually installed package, it will say something like "It wasn't possible to find a reason to install package".

share|improve this answer

You can also use plain dpkg .

For example, dpkg -p [PACKAGE NAME] provides its information:

Example : if [ PACKAGE NAME ] is zip

dpkg -p zip  
Package: zip  
Priority: optional  
Section: utils  
Installed-Size: 616  
Maintainer: Ubuntu Developers <>  
Architecture: i386  
Version: 3.0-2  
Replaces: zip-crypt (<= 2.30-2)  
Depends: libbz2-1.0, libc6 (>= 2.7)  
Recommends: unzip  
Conflicts: zip-crypt (<= 2.30-2)  
Size: 318238  
Description: Archiver for .zip files  
 This is InfoZIP's zip program. It produces files that are fully  
 compatible with the popular PKZIP program; however, the command line  
 options are not identical. In other words, the end result is the same,  
 but the methods differ. :-)  
 This version supports encryption.  
Original-Maintainer: Santiago Vila <>  
share|improve this answer
this is not an answer – Fredrick Gauss Dec 2 '14 at 9:42
The OP is asking for the reverse dependencies, as in which packages depends on zip not what packages zip depends on. – ecerulm Sep 15 at 10:43

Here's a simple way that doesn't rely on aptitude, which 10.10 doesn't ship by default anymore.


You do need root access to run these commands.


Open Synaptic and try to remove it.

If a dialog pops up asking you to delete other packages, those are the packages that (recursively) depend upon it.

From terminal

apt-get remove package_name_goes_here -s

Again, the packages that would be removed as a result are all those that (recursively) depend on it. (The -s parameter tells apt-get to not actually remove the package.)

share|improve this answer
This is a risky solution because it could actually remove the package and all dependencies if they mis-click. – ImaginaryRobots Oct 10 '10 at 15:41
@ImaginaryRobots, that's a lot of misclicking. (You have to misclick Ok on the first dialog, then Apply, then again Ok on the confirmation dialog.) For the terminal version, there's also an extra y/N confirmation request should you typo -s. I added a warning however. – badp Oct 10 '10 at 15:44
-1 as this information is availble in Synaptic under the dependencies tab, when viewing the properties of a package. – alexanderpas Oct 29 '10 at 22:46
@alex incorrect - that dialog doesn't tell you whether that package is installed manually or automatically. PS: Inbox counter reset, try harder. – badp Oct 29 '10 at 22:52
@badp no, but that info can be found with the "Installed (manual)" status filter on the main screen, and can be seen in the package menu when you select a package. – alexanderpas Oct 29 '10 at 23:42

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.