You are not logged in.
When I run
pacman -Qi <pkgname>
I get the installation date of the current version of a package, i.e. the date when a package was updated the last time. Additionally, I would like to know the initial installation date, i.e. the date when I typed
pacman -S <pkgname>
or when the package was installed as a dependency the first time due to a command like this.
From my research until now, I know that I can read /var/loc/pacman.log to find out this date but obviously, this is a little bit inconvenient. I wanted to write a little script that reads the log-file for me but before doing so, I'd like to make sure that I did not overlook anything. So, is reading pacman.log the only way for me to find out the initial installation date? Thanks for any hints on how to find out what I am looking for without having to code myself
Last edited by Binabik (2017-10-26 09:35:45)
Offline
Yes, check the log. Not much of a script is need though:
sed -n "/ installed $1/{s/].*/]/p;q}" /var/log/pacman.log
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Install the pacutils package, and then run
paclog --package=<pkgname>
It will filter pacman.log and show you all entries that touch a given package, the first line will be the initial package installation and later lines will be upgrade/reinstall/removal.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Hi everyone, thanks for your valuable replies, especially the paclog command was new to me. Nevertheless, I will build my own because it does not yet completely fulfill my requirements.
Offline