How to remove i386 packages from CentOS / Fedora / RHEL installation

By angsuman, Gaea News Network
Sunday, July 11, 2010

CentOS / RHEL / Fedora (same parentage) has the nasty habit of installing some i386 packages even though the corresponding i686 (for 32 bit machines) or x86_64 (for 64 bit machines) packages have already been installed. Here is a script to remove all i386 packages from your Linux box (assuming it uses an rpm based system like RHEL, Fedora or CentOS):

yum list installed|grep i386|cut -f1 -d’ ‘ | xargs yum -y remove

Note: Use this with care!

This doesn’t check whether a corresponding i686 / x86_64 package already exists in your system. So you may also end up removing some packages which doesn’t have any corresponding highre version.

An improved script should check for corresponding higher version and remove the lower version only when better version exists.

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :