3

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 ?

  • Almost certainly because nobody has cared enough to do it. The info that is logged can be processed with a variety of tools (awk, perl, etc) to pretty-print the output if/when required. If you feel there should be some pretty-printed access to the data within synaptic or whatever, then feel free to submit a patch....or, at least, a wish-list bug report requesting it. BTW, as a user, I'm very happy with the format of /var/log/dpkg.log, it gives me all the info I want, in a format that's easily used in my scripts without having to extract the data from irrelevantly verbose waffle. – cas May 24 '16 at 2:41
4

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 of apt operations (including those initiated by aptitude), the requesting user (when invoked using sudo), and the actions: installed packages, upgraded packages, removed packages, purged packages...

Here's an example:

Start-Date: 2016-05-09  23:29:03
Requested-By: steve (1000)
Install: libnspr4-dev:amd64 (2:4.12-2, automatic), liboauth-dev:amd64 (1.0.1-1), libcurl4-gnutls-dev:amd64 (7.47.0-1, automatic), libnss3-dev:amd64 (2:3.23-2, automatic)
End-Date: 2016-05-09  23:29:10

This shows that I requested an installation of liboauth-dev, which pulled in libnspr4-dev, libcurl4-gnutls-dev and libnss3-dev automatically.

You'll also find /var/log/apt/term.log which logs the terminal output of apt operations.

Those files don't track dpkg operations, so to get a complete picture — i.e., including operations done using dpkg directly — you'll still need to look at /var/log/dpkg.log. If you limit your direct use of dpkg as much as possible then the apt history will give a good idea of what was done when...

  • actually even apt log is not for the end-user, by end-user I meaning one who doesn't use CLI at all or uses sparingly. While I did find a better looking tool for the self, the question actually remains more or less un-answered :( hence taking out marking the question as answered, sorry :) – shirish May 23 '16 at 16:57
  • 1
    I get your point, it would be nice to be able to view a package's history from a tool like Synaptic — when was it installed, with what set of packages... – Stephen Kitt May 23 '16 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.