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

How can I find out why a particular package was installed?

  • Is it part of the default installation?
  • Was it specified manually, or was it chosen automatically to meet dependencies?
  • Which packages are dependent on it?
  • When was it installed?
share|improve this question

1 Answer 1

up vote 21 down vote accepted

A quick and short reasoning on why a certain package was installed can be found out by typing the following command in a terminal (Applications -> Accessories -> Terminal) :

aptitude why <package-name>

Replace with the name of the package you are interested in. For example, typing aptitude why libgoo-canvas-perl outputs the following :

i   shutter Suggests libgoo-canvas-perl

This basically means that the package shutter in this case has suggested libgoo-canvas-perl be installed. By then typing aptitude why shutter I can walk up the dependency chain.

However, there is a caveat. I often notice aptitude finds the most plausible explanation for the situation that may not be the actual case, but will nevertheless give you a clue to look further.

In my case, shutter suggests libgoo-canvas-perl - however, suggested packages are not automatically installed by default. Nevertheless, it jogs my memory of the "experience" with not being able to edit screenshots with shutter which led me to manually install ligbgoo-canvas-perl

Finally, you can find out whether a package was installed automatically (meaning decided by the package management system as mandatory from looking at dependencies and recommendations of other packages you asked it to install) by running following command.

aptitude show <package-name>

This will output a line like below (3rd line of the output) :

Automatically installed: no

For more info run info aptitude (in a terminal) or visit the Aptitude wiki page

To find out when a particular package was installed, there are 2 options:

  1. Synaptic package manager maintains a history log of all activity. To view the history log file, choose History from the File menu. You can search for Install (mind the case) to list all entries regarding installation. However, this will only show the packages installed using Synaptic
  2. Run the following command in a terminal. This will search dpkg logs for installation history entries. However, there is maximum limit of how much of these logs are retained, so if the package you are looking for was installed a long time ago, you may not find it. More details here

    zcat -f /var/log/dpkg.log* | grep "\ install\ " | grep -i <package-name>
share|improve this answer
+1 zoinks: very useful, thanks – msw Sep 21 '10 at 14:11
Yes, thanks a lot! Just what I needed! – bheeshmar Apr 30 '13 at 14:26
If you want to find out when a package was installed or upgraded zcat -f /var/log/dpkg.log* | grep -i PackageName | egrep “\ install\ |\ upgrade\ “ – Chris Good Jul 31 at 0:19

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.