You are not logged in.

#1 2017-10-21 16:38:00

Binabik
Member
Registered: 2017-04-20
Posts: 8

[SOLVED] How to find out the initial installation date of a package?

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 smile

Last edited by Binabik (2017-10-26 09:35:45)

Offline

#2 2017-10-21 17:01:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [SOLVED] How to find out the initial installation date of a package?

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

#3 2017-10-22 00:15:29

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] How to find out the initial installation date of a package?

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

#4 2017-10-26 09:34:55

Binabik
Member
Registered: 2017-04-20
Posts: 8

Re: [SOLVED] How to find out the initial installation date of a package?

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

Board footer

Powered by FluxBB