Removing two RPMs with the same name


While performing an upgrade this weekend, I ran into an issue where a few packages were showing up twice in the rpm query output:

$ rpm -q -a | grep frysk
frysk-0.0.1.2006.10.02.rh1-1.fc6 frysk-0.0.1.2006.10.02.rh1-1.fc6

This was causing several package installations to fail, and was preventing me from upgrading several packages with known security issues. When I tried to remove the frysk package, I was greeted with the following error message:

$ rpm -e frysk-0.0.1.2006.10.02.rh1-1.fc6
error: “frysk-0.0.1.2006.10.02.rh1-1.fc6” specifies multiple packages

After reading through the rpm manual page, I came across the “–allmatches” option. This allows a specific option to apply to all instances of a package, and allowed me to finally remove both occurrences of the frysk package:

$ rpm -e --allmatches frysk-0.0.1.2006.10.02.rh1-1.fc6

RPM can be such a pain sometimes, and I am still baffled how it got itself into this in the first place.

This article was posted by Matty on 2007-02-05 21:08:00 -0400 -0400