Friday, July 20, 2012

How to check when a patch was last installed or upgraded ?

Syntax: rpm -qa --last | grep <package name>

Example:  Suppose you want to know when the MySql packages was last installed or upgraded.

The syntax should be:  
[root@Hostxyz ~]# rpm -qa --last | grep -i mysql
MySQL-client-5.6.5_m8-1.rhel5                 Fri 13 Jul 2012 02:35:01 AM PDT
MySQL-server-5.6.5_m8-1.rhel5                Fri 13 Jul 2012 02:34:44 AM PDT
php54-mysql-5.4.0-1.el5                           Fri 13 Jul 2012 01:17:21 AM PDT
[root@Hostxyz ~]#

To list the entire package list, just execute # rpm -qa --last

No comments:

Post a Comment