Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'd like to check the binaries installed on my server and know if the is a 32-bit binary installed.

rpm -qa would give me all the packages installed. However if i try to grep through it like so, rpm -qa | grep x86 it would again list all the packages.

Is there another way to find if 32-bit packages are installed?

  • OS - CentOS 6.4
  • arch- 64 bit
share|improve this question

2 Answers 2

You can query RPM database for architecture of installed packages. This command will list all installed packages and their architecture:

rpm -qa --queryformat '%{NAME} %{ARCH}\n'

So if you want to find 32-bit packages only you can check the above list for architectures i686, i586, i486 and i386:

rpm -qa --queryformat '%{NAME} %{ARCH}\n' | grep 'i[6543]86' | cut -d' ' -f1
share|improve this answer

Would

yum list installed *.i*86

do what you want ? There's more information on this here in the CentOS General faq.

share|improve this answer
    
Make it yum list installed *.i*86 and it will. –  Michael Hampton Sep 19 '13 at 15:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.