Board index Linux Linux - Tips&Tricks

Moderator: chandranjoy

RPM - Redhat Package Manager

Postby chandranjoy » Wed Sep 01, 2010 8:31 pm

How do I determine the architecture of an installed package?

A query with the rpm -q command does not display architecture by default. Use rpm with these options to view the architecture:

rpm -q --queryformat="%{n}-%{v}-%{r}.%{arch}.rpm\n" <package-name>


Replace <package-name> with the name of the package that needs to be queried. If unsure of the package name, the same --queryformat option can be used in conjunction with the rpm -qa command piped through grep to search for all packages whose names match the specified string:
rpm -qa --queryformat="%{n}-%{v}-%{r}.%{arch}.rpm\n" | grep <package name>




How can I tell when an RPM package was installed on my system?


You can use the rpm command to achieve this. To get a list of all installed packages along with the date and time they were installed, use the command:

rpm -qa --last


For information about a specific package, specify the package_name in the command:
rpm -q --last >package-name<


For example, you can use this command to look at the filesystem package:
rpm -q --last filesystem


which returns:
filesystem-2.2.1-3 Wed 07 Jan 2004 05:30:57 AM EST

:)
chandranjoy
Site Admin
 
Posts: 283
Joined: Fri Oct 23, 2009 11:19 pm

Return to Linux - Tips&Tricks

Who is online

Users browsing this forum: No registered users and 2 guests


cron