Get RPM install date

Sometimes you don’t know when an RPM was installed – maybe it was updated, maybe it came with the system. In any case, it can be handy when debugging or even for auditing purposes. This gives an example of getting the install time for the “filesystem” package:

somehost%  rpm -q filesystem --queryformat '%{name} %{installtime:date}\n'
filesystem Mon 18 May 2015 02:57:16 PM EDT

Really all you need is the “%{installtime:date}\n”, but the name can be handy if you want to use it with “-qa” (query all). Also can be handy to put “%{installtime}” (gives seconds since epoch) on the front and run it through “sort -n” to find out order of install.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *