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

Could someone please help me with how I can list the packages that were manually installed within a certain time frame. For instance, If I want to see a list of packages that were manually installed in the past 2 may I go about doing it?

Than you

share|improve this question

This is a script using aptitude (to be installed) and dpkg logs,
change the date variable, in format YYYY-MM-DD:




join -22\
  <(aptitude -F%p search '?installed?not(?automatic)' |
    sort) \
  <(less /var/log/dpkg.log* |
    sort |
    awk -v date="$date" '$1 >= date && $3 == "install" { print $1, $4 }' |
    sort -u -k2,2) |
  awk '{ print $2, $1 }' |
share|improve this answer
Isn't there a command that I can use to get the same information? I mean, it seems to me that an important piece of software like 'aptitude' or dpkg must have some options or switches that allow me to get that kind of information directly...without having to resort to a shell script. – Jay Jul 6 '11 at 9:08
No, not that I know of. – enzotib Jul 6 '11 at 11:50
  • If installed as a DEB Ubuntu Software Center tracks when something is installed:

enter image description here

  • Installing from a tar would be rather impossible. You would have to know what packages where installed to have a look at the date of creation of the executable.
share|improve this answer
I do all my installation through aptitude. So is there a way to use aptitude to query the installed packages in a meaningful way? Thanks – Jay Jul 3 '11 at 19:40

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.