So I've been trying figure out where Ubuntu saves all the program information for installed programs. Is there a config file or a log that an app like Crossover would write when it was installed? I'm trying to figure out when I installed a few things, but don't see when it was.
Asked
Active
Viewed 88 times
2 Answers
1
So figure out at which time you installed some packages have a look at the APT history logs /var/log/apt/history.log* or the dpkg logs /var/log/dpkg.log*
Florian Diesch
- 89,643
0
There's no direct way of getting those informations AFAIK.
However a sort of report containing the timestamp of every apt-get command run which resulted in the installation of at least one package followed by the list of packages installed can be created by parsing the logs in /var/log/apt:
zcat /var/log/apt/history.log.* | cat - /var/log/apt/history.log | grep -Po '^Start-Date: \K.*|^Install: \K.*' | perl -ne '!/^[0-9]{4}-[0-9]{2}-[0-9]{2}/&&print($prev.$_);$prev=$_'
For example the end of such report on my system looks like this (I had to purge - reinstall zsh a couple of times, that's why it's mentioned twice):
% zcat /var/log/apt/history.log.* | cat - /var/log/apt/history.log | grep -Po '^Start-Date: \K.*|^Install: \K.*' | perl -ne '!/^[0-9]{4}-[0-9]{2}-[0-9]{2}/&&print($prev.$_);$prev=$_' | tail
2016-01-05 19:35:38
zsh:amd64 (5.1.1-1ubuntu1)
2016-01-06 12:19:18
zsh:amd64 (5.1.1-1ubuntu1)
2016-01-07 20:37:19
zsh-common:amd64 (5.1.1-1ubuntu1, automatic)
2016-01-07 23:01:26
ncurses-term:amd64 (5.9+20150516-2ubuntu1, automatic), openssh-server:amd64 (6.9p1-2, automatic), openssh-sftp-server:amd64 (6.9p1-2, automatic), ssh:amd64 (6.9p1-2), ssh-import-id:amd64 (4.5-0ubuntu1, automatic), libck-connector0:amd64 (0.4.6-5, automatic)
2016-01-08 03:31:16
gstreamer1.0-plugins-bad-videoparsers:amd64 (1.6.0-1ubuntu1), libgstreamer-plugins-bad1.0-0:amd64 (1.6.0-1ubuntu1, automatic)
kos
- 41,268