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.

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 months..how may I go about doing it?

Than you

share|improve this question
add comment

2 Answers

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

#!/bin/bash

export LC_COLLATE=C

date="2011-05-31"

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 }' |
  sort
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
add comment
  • 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
add comment

Your Answer

 
discard

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.