Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Everytime I install something with yum, it tries to install both x86_64 and i386 versions of the package if both are available. Is there any way I can forbid that without specifying the arch of the package?

share|improve this question
up vote 11 down vote accepted

Add multilib_policy=best to your /etc/yum.conf

Yum will now try to install the "best" package.arch for your system and it will only install that one (as long as it is available).

Assuming you're on a 64-Bit system, yum will first try to install package.x86_64, if that doesn't exist it will fall back to i386 and noarch.

The default setting is multilib_policy=all, which means to install all possible arches.

share|improve this answer
+1 Yes, that's the best answer. Unfortunately, most people don't now this option. – knweiss Oct 24 '09 at 14:06

Use the exclude function in yum.conf:

exclude=*.i386 *.i686
share|improve this answer
Or exclude=*.i?86 (/etc/yum.conf). That way, yum search won't even list 32-bit packages. – basic6 Mar 22 '15 at 16:25

It would try to install i386 version if you have x86_64 version already installed.

Pay attention that if you use exclude in yum.conf you could exclude packages only being available in i386 arch

A safer way could be to explicitly request the arch at install time:

yum install package.x86_64
share|improve this answer

I've been using option exactarch=1 in /etc/yum.conf for some time, and it has worked for me.

It still allows you to manually specify arch, but if you don't, it install only x86_64, not both.

According to el6 manual, yum.conf(5):

          exactarch  Either  ‘1’  or ‘0’. Set to ‘1’ to make yum update only update the architectures of
          packages that you have installed. ie: with this enabled yum will not install an  i686  package
          to update an i386 package. Default is ‘1’.


          multilib_policy  Can  be set to ’all’ or ’best’. All means install all possible arches for any
          package you want to install. Therefore yum install foo will install foo.i386 and foo.x86_64 on
          x86_64, if it is available. Best means install the best arch for this platform, only.

BTW, both multilib_policy=best and exactarch=1 seem to be the default for some time now.

share|improve this answer

-x, --exclude=package Exclude a specific package by name or glob from updates on all repositories. Configuration Option: exclude

--disableexcludes=[all|main|repoid] Disable the excludes defined in your config files. Takes one of three options: all == disable all excludes main == disable excludes defined in [main] in yum.conf repoid == disable excludes defined for that repo

above from man you can use or you can install yumex which give gui u can choose the rpm which you need to install.

share|improve this answer
I know about excludes, I just don't want to type them every time, neither do I want to create aliases. I just don't think installing i386 on 64-bit system by default is a good thing. – Nikolai Prokoschenko Oct 22 '09 at 16:35
in that case you choose from gui that better options – Rajat Oct 23 '09 at 3:07

What works for me is removing all of the ix86 packages from the machine. Now it never asks me to install any 32bit anything.

First setup your .rpmmacros like this:

cat ~/.rpmmacros
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}

Then run this (I'm assuming bash):

rpm -qa | egrep "i.86$"

That will give you a list of non x86_64 rpms currently installed. You can remove all of them with this:

rpm -e $(rpm -qa | egrep "i.x86$")

Now you have a pure 64bit system.


share|improve this answer

Your Answer


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.