PDA

View Full Version : Cannot clean dupe



cgrim
6th November 2007, 11:58 PM
I upgraded Fedora 7 on 8 and after that I've found duplicate package by package-cleanup utility:

# package-cleanup --dupes
Setting up yum
avahi-0.6.21-6.fc8.x86_64
avahi-0.6.17-1.fc7.x86_64

I tried to remove the duplicate package but with no success:

# package-cleanup --cleandupes
Setting up yum
I will remove the following old duplicate packages:
avahi - 0.6.17-1.fc7.x86_64
Is this ok [y/N]: y
error: %postun(avahi-0.6.17-1.fc7.x86_64) scriptlet failed, exit status 1


How can I remove the duplicate package please?
Thanks

cgrim
7th November 2007, 12:01 AM
Ohhh, I tried better google query and found similar question with answer ;) So the solution is:
rpm -e --nodeps --allmatches --noscripts avahi-0.6.17-1.fc7.x86_64

Brian1
7th November 2007, 12:14 AM
Or use the --force option with the rpm command with -e
rpm -e name_of _package --force
the force option is not the best method unless sure. You can add all the packages at once to the rpm command that are dups. But this may cause conflicts with other packages that may still be wanting the older one. RPM is Hell at times.

Brian

STRASHARO
9th November 2007, 01:39 PM
Or use the --force option with the rpm command with -e
rpm -e name_of _package --force
the force option is not the best method unless sure. You can add all the packages at once to the rpm command that are dups. But this may cause conflicts with other packages that may still be wanting the older one. RPM is Hell at times.

Brian


[root@T-34 ~]# rpm -e avahi-0.6.17-1.fc7.i386 --force
rpm: only installation, upgrading, rmsource and rmspec may be forced
[root@T-34 ~]#

strikeforce
9th November 2007, 01:51 PM
Or just use yumex like I just did.

**Edit that didn't work :(

This works

rpm -e --noscripts avahi-0.6.17-1.fc7.i386

I just tried it.

STRASHARO
9th November 2007, 02:34 PM
The solution from cgrim worked just fine.

jovian
12th April 2008, 02:33 PM
Thanks a bunch! This worked for me.

(rpm -e --nodeps --allmatches --noscripts avahi-0.6.17-1.fc7.x86_64)

robatino
13th April 2008, 01:47 AM
If after removing one of the duplicate packages with --nodeps or --force, you check the integrity of the remaining package with

rpm -V avahi

you'll probably find a lot of files missing, since the two packages normally share a lot of files (true of most packages with the exception of a few such as the kernel which are designed to allow multiple versions installed). To repair the remaining package, you can use the command

rpm -Uvh --replacepkgs <package RPM file>