32-bit package cleanup

Red Hat and it’s variants have a nasty habit of installing 32-bit packages on a 64-bit platform like x86_64. See the output from uname -a to be sure, before proceeding.

Here is a one-liner that can be used (AT YOUR OWN RISK) to remove the offending packages. It has been my experience that this is generally safe to do.

rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}n' | grep i.86$ | xargs rpm -e --nodeps

Also, adding this to /etc/yum.conf will prevent 32-bit packages from creeping back in.

exclude=kernel* *.i.86

One thought on “32-bit package cleanup

  1. There’s an error here. You are missing a \

    rpm -qa –qf ‘%{name}-%{version}-%{release}.%{arch}\n’ | grep i.86$ | xargs rpm -e –nodeps

    There’s an easier way to do this with yum

    yum remove *.i*86

Leave a Reply

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