how can i tell when an RPM was installed?

spanky

Lifer
Jun 19, 2001
25,716
4
81
is there an rpm command to tell me when a specific rpm was installed? i have a server which i thought had a certain version of apache installed, but apparently, it did not. when i go to try and install it, it tells me that another newer version of apache is already installed. i'm trying to find out when this newer version of apache was installed. can i do that with an RPM switch? thank you.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Have you looked at the man page for rpm?

I'm not being snippy, I just don't have an RH box around to check. If it's possible, it's almost certain to be part of rpm -q.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Technically yes, but only as a side effect of the RPM transactions. You can ask for the installation transaction id for a specific package which just happens to be the epoch when the package was installed.

rpm -q --qf "%-20{NAME} %-20{INSTALLTID}\n" <packagename>