I wanted to lookup history of my recent updates/upgrades, package purges and found out that other than aptitude and ugly dpkg.log, there doesn't seem to be anything else which does the same. See section 9.4 of the Debian FAQ. Does anybody have an idea why such a tool which will keep a pretty log or logs of all past package administration tasks done doesn't exist. There are a few workarounds shared in the link above but no proper tool as such.
I looked up at /var/log/aptitude
and the various gunzipped logs, as well as the various dpkg logs but neither of them are aimed at end-users.
[/var/log] - [10058]
[$] ls -lh aptitu*
-rw-r--r-- 1 root root 117K May 23 15:49 aptitude
-rw-r--r-- 1 root root 24K May 1 00:26 aptitude.1.gz
-rw-r--r-- 1 root root 35K Apr 1 02:07 aptitude.2.gz
-rw-r--r-- 1 root root 26K Feb 28 03:13 aptitude.3.gz
-rw-r--r-- 1 root root 29K Jan 30 04:29 aptitude.4.gz
-rw-r--r-- 1 root root 27K Dec 30 15:28 aptitude.5.gz
-rw-r--r-- 1 root root 32K Dec 1 04:39 aptitude.6.gz
Now as can be seen the log stretches almost 6 months and aptitude does a brilliant job of keeping all my attempts of upgrades, downgrades, packages purges whatever but it records only the 'attempts' . Dpkg has a much better record but looks lot more worse than aptitude logs.
Would be glad if somebody can share some more insight. There should be some gtk/tk/GUI based tool for the same, maybe something which is an add-on to synaptic/software center or whatever tool the user chooses.
One excuse or possible explanation could be that the developers valued privacy but then you have logs for everything else, not just these so that doesn't make sense much to me.
The other part could only be, that either Debian or upstream didn't and doesn't care for such logs and expect their users to keep a history or rely on the aptitude kinda tool, this also doesn't cut much ice as –
aptitude show aptitude | grep Priority
Priority: optional
So there would be users who would not use aptitude.
Are there any FOSS Operating Systems (not limited to GNU/Linux) which have solved the aforementioned problem/issue ?
Best Answer
apt
itself keeps nicer log files in/var/log/apt/history.log
(and rotated variants); these track the start and end date and time of every set ofapt
operations (including those initiated byaptitude
), the requesting user (when invoked usingsudo
), and the actions: installed packages, upgraded packages, removed packages, purged packages...Here's an example:
This shows that I requested an installation of
liboauth-dev
, which pulled inlibnspr4-dev
,libcurl4-gnutls-dev
andlibnss3-dev
automatically.You'll also find
/var/log/apt/term.log
which logs the terminal output ofapt
operations.Those files don't track
dpkg
operations, so to get a complete picture — i.e., including operations done usingdpkg
directly — you'll still need to look at/var/log/dpkg.log
. If you limit your direct use ofdpkg
as much as possible then theapt
history will give a good idea of what was done when...