Monday, August 18, 2008

How to find all the rpm packages installed on a particular date

To find all the RPM packages which were installed on a particular date:

# rpm -qa --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH}) INSTALLED: %{INSTALLTIME:date}\n" | grep my_date

Example:


rpm -qa --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH}) INSTALLED: %{INSTALLTIME:date}\n" | grep "29 Sep 2006"

To find the install date and time of an RPM package:

# rpm -qa --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH}) INSTALLED: %{INSTALLTIME:date}\n" | grep rpm_package_name

If you want the epoch time rather than human readable date:

# rpm -qa --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH}) INSTALLED: %{INSTALLTIME}\n" | grep rpm_package_name

Example:

rpm -qa --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH}) INSTALLED: %{INSTALLTIME:date}\n" | grep libaio

1 comment:

Anonymous said...

Hi Satish, I would like to select all x86_64 source rpm from source! How can I do!!