Skip to main content

Posts

Showing posts with the label rpm

Removing Duplicate RPM Packages

My OEL4 servers still have duplicate RPM packages on 64 bit servers. Libs for 32 bit and 64 bit are often installed, even though they may not always be used. When upgrading a package, such as glibc, you run into the error that yum won't touch a package because it finds duplicates. In this case you can try Removing Duplicate RPM Packages or remove a package using an explicit architecture tag: yum package.{i386,i686,x86_64} such as yum remove glibc.i686 . If you have RHEL/OEL5 or higher, you're in luck because you can try to install the package yum-utils and run package-cleanup --cleandupes . yum-utils offer a bunch of useful tools for working with yum repos and so on.

Removing multiple GPG key using rpm

For some reason I had a few copies of the same GPG key in my RPM key store and removing them was tricky. Normally, you list your key using rpm -qa gpg-* and can remove them using rpm -e gpg-pubkey-12345678 . Just like anything installed with rpm, for that matter. But what if you have multiple keys? You'll get multiple matches... Easy! Just use rpm -e --allmatches gpg-pubkey-12345678 . :) Source: Red Hat archives

How to determine which architecture of an RPM is installed?

While playing with Oracle Linux (OEL) and Oracle RDBMS, we waded through the lengthy install guide for Oracle. We had decided to install the 64 bit (x86_64) version of Oracle. The install guide showed that several 32 bit RPMs (libraries) are still required. Of course, you can't use the CD for this. Fortunately, the guide describes in (albeit lengthy) detail what to do, where to find the RPMs and so on. At point in time, we needed to know which architecture of a certain RPM was installed: 32 bit or 64 bit? Or both? An Oracle consultant provided us with a handy option for the rpm command to find out: rpm -qa <RPM_NAME> --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n"