Displaying YUM friendly package names with RPM

From V.S.V., Inc.
Jump to: navigation, search

Displaying YUM friendly package names with RPM

 rpm -qa --qf “%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n”

Note: There should be one (1) dash before "qa" and two (2) dashes before "qf".

To find all the non-64bit packages on a 64-bit machine, run this:

 rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' |grep -v x86 |grep -v noarch|grep -v none

Note: The "none" on the end is so you don't accidentily remove your GPG keys.