I installed a package, i forgot when, using synaptic package manager, i want to know the installation date. I don't know how and Google doesn't seem to be helpful helping today.
-
In general, do not expect that every feature of a Microsoft Windows system has a correspondence on a Linux system. For future questions: avoid subjective opinions ("billion times better than") and unnecessary comments (if you already have found an answer, you would not have asked here...). – jofel Oct 18 '13 at 16:11
-
Also note that the features are often implemented very differently across the various Linux distributions, Debian/Ubuntu use apt/dpkg, Redhat/Fedora use RPM. – slm Oct 18 '13 at 16:15
-
@jofel fine, edited my question – Lynob Oct 18 '13 at 17:18
3 Answers
Method #1 - dpkg.log
You can look through the /var/log/dpkg.log files but this could be problematic since these files are rotated by logrotate
and can get deleted over time. So if it's something recent you can look to these files:
Example
$ ls -lt /var/log/dpkg.log*
-rw-r--r-- 1 root root 378458 Oct 6 11:38 /var/log/dpkg.log
-rw-r--r-- 1 root root 14309 Sep 6 21:29 /var/log/dpkg.log.1
-rw-r--r-- 1 root root 3260 Aug 25 19:07 /var/log/dpkg.log.2.gz
-rw-r--r-- 1 root root 2341 Jul 20 08:43 /var/log/dpkg.log.3.gz
-rw-r--r-- 1 root root 1602 Jun 26 23:19 /var/log/dpkg.log.4.gz
-rw-r--r-- 1 root root 2169 May 27 22:09 /var/log/dpkg.log.5.gz
-rw-r--r-- 1 root root 747 Apr 26 13:23 /var/log/dpkg.log.6.gz
-rw-r--r-- 1 root root 991 Mar 20 2013 /var/log/dpkg.log.7.gz
-rw-r--r-- 1 root root 19268 Mar 9 2013 /var/log/dpkg.log.8.gz
-rw-r--r-- 1 root root 2268 Jan 29 2013 /var/log/dpkg.log.9.gz
-rw-r--r-- 1 root root 12920 Dec 9 2012 /var/log/dpkg.log.10.gz
-rw-r--r-- 1 root root 92929 Nov 26 2012 /var/log/dpkg.log.11.gz
And then grep through them:
$ grep -E "installed.*thunderbird" /var/log/dpkg.log* | head -5 /var/log/dpkg.log:2013-10-06 02:51:40 status installed thunderbird:amd64 1:24.0+build1-0ubuntu0.12.10.1
/var/log/dpkg.log:2013-10-06 02:51:40 status installed thunderbird-globalmenu:amd64 1:24.0+build1-0ubuntu0.12.10.1
/var/log/dpkg.log:2013-10-06 02:51:40 status installed thunderbird-locale-en:amd64 1:24.0+build1-0ubuntu0.12.10.1
/var/log/dpkg.log:2013-10-06 02:51:40 status installed thunderbird-gnome-support:amd64 1:24.0+build1-0ubuntu0.12.10.1
/var/log/dpkg.log:2013-10-06 02:51:41 status installed thunderbird-locale-en-us:all 1:24.0+build1-0ubuntu0.12.10.1
Method #2 - .list files
Another technique is to look through the .list
files that are maintained by dpkg
which is the workhorse that actually does the package installations under the hood for synaptic and apt.
Example
This will show you the last 5 packages installed using this method:
$ ls -tl /var/lib/dpkg/info/*.list | head -n 5
-rw-r--r-- 1 root root 4261 Oct 6 11:38 /var/lib/dpkg/info/libdirectfb-1.2-9:amd64.list
-rw-r--r-- 1 root root 856 Oct 6 11:38 /var/lib/dpkg/info/libts-0.0-0:amd64.list
-rw-r--r-- 1 root root 216 Oct 6 11:38 /var/lib/dpkg/info/tsconf.list
-rw-r--r-- 1 root root 263 Oct 6 11:38 /var/lib/dpkg/info/libbluray1:amd64.list
-rw-r--r-- 1 root root 290 Oct 6 11:38 /var/lib/dpkg/info/libaacs0:amd64.list
You can also look for packages using this method:
$ ls -tl /var/lib/dpkg/info/*.list | grep thunderbird
-rw-r--r-- 1 root root 260 Oct 6 02:47 /var/lib/dpkg/info/thunderbird-locale-en-us.list
-rw-r--r-- 1 root root 187 Oct 6 02:47 /var/lib/dpkg/info/thunderbird-gnome-support.list
-rw-r--r-- 1 root root 5041 Oct 6 02:47 /var/lib/dpkg/info/thunderbird.list
-rw-r--r-- 1 root root 1148 Oct 6 02:47 /var/lib/dpkg/info/thunderbird-locale-en.list
-rw-r--r-- 1 root root 178 Oct 6 02:47 /var/lib/dpkg/info/thunderbird-globalmenu.list

- 369,824
You can use ls -lh
in the directory it was installed to (like /usr/bin
) to see the date. Also, you can use the location where Debian holds packages (can't remember offhand, it's in /var
somewhere).

- 7,631
If it is a debian package you can use this command.
grep install /var/log/dpkg.log

- 39,297
-
1@Fischer An alternative is the log files in
/var/log/apt
. Note that Debian prunes log files by default, so you won't get history for very far back. – Faheem Mitha Oct 18 '13 at 15:56