22 February 2008

Clean useless packages under 64bits GNU/Linux

It seems there is some dependency "issues" when installing a 64bits GNU/Linux. It is, for instance, the case under Fedora.
Although the architecture of the installed OS is 64bits, there is some i386 or i686 installed packages.
Some are needed, but lots might be removed.

To begin, to get a sorted list of such potential packages, you can use:
rpm -qa --qf "%{NAME}.%{ARCH}\n" |grep -v x86_64 |grep -v noarch |grep -v "(none)" |sort

Then, you can remove all packages you are sure you do not need, but be careful with the dependencies.
To make it quicker, you can request the remove of package(s) you know it is needed by lots of others (like some libraries).

After all of this, ensure there is no dependencies problem. For instance, with yum utilities:
- ensure the database is up to date with rpm --rebuilddb,
- check if there is problem with package-cleanup --problems.

Finally, to complete the cleaning, you can use the package-cleanup --leaves and ensure you need all those "independent" package(s), else remove them.

Personally, I have removed about 150 packages like this.
For information, there is some i386/i686 packages which are needed by x86_64 ones.
It was the case for me with compat-libstdc++-33.i386, libgcc.i386 and glibc.i686.

No comments:

Post a Comment

Thank you for your visit, let's share your point of view: