Aptitude List Recently Installed
Below is a grep one-liner to look through the logs and find out what was recently installed. Comes in handy if you can’t remember what the exact name of that package you installed earlier was.
grep "install\ " /var/log/dpkg.log
This should give you a helpful output in the form below:
root@lambda:~# grep "install\ " /var/log/dpkg.log 2011-07-05 09:17:07 install libpam-modules-bin <none> 1.1.3-2 2011-07-05 09:17:13 install libsane-common <none> 1.0.22-4 2011-07-05 09:17:52 install libqzeitgeist0 <none> 0.7.0-1 2011-07-05 09:18:32 install libsane-extras-common <none> 1.0.22.2 2011-07-05 21:55:06 install sendmail-base <none> 8.14.4-2 2011-07-05 21:55:06 install sendmail-cf <none> 8.14.4-2 2011-07-05 21:55:11 install sendmail-bin <none> 8.14.4-2+b1 2011-07-05 21:55:24 install libpq5 9.0.3-1 9.0.4-1+b1 2011-07-05 21:55:24 install sensible-mda <none> 8.14.4-2+b1 2011-07-05 21:55:25 install sendmail <none> 8.14.4-2
You can also replace install with remove to view the recently removed files:
root@lambda:~# grep "remove\ " /var/log/dpkg.log 2011-07-05 09:16:42 remove liblchown-perl 1.01-1+b1 <none> 2011-07-05 21:55:08 remove exim4-config 4.76-2 <none> 2011-07-05 21:55:09 remove exim4-daemon-light 4.76-2 <none> 2011-07-05 21:55:09 remove exim4-base 4.76-2 <none> 2011-07-05 21:55:23 remove exim4 4.76-2 <none>