unix

How do I list the architecture for the RPMs installed on my Linux server?

You may find that you have 2 versions of some RPMs installed, but it’s not easy to tell which is which by default with the rpm command. Sometimes you just may need to confirm whether a package is 32-bit or 64-bit. Either way, you can however pass the –queryformat argument to it and provide it with the format you would like.

To list all installed RPMs and their architecture:

rpm -qa –queryformat ‘%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n’

To list the version of a single RPM and it’s architecture:

rpm -q glibc –queryformat ‘%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n’

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top