Bug 141552 - FC2 -> FC3 upgrade, massive package doubling, no easy way to remove
Summary: FC2 -> FC3 upgrade, massive package doubling, no easy way to remove
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-01 23:02 UTC by Adam Wiggins
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-12-02 00:26:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adam Wiggins 2004-12-01 23:02:09 UTC
I upgraded my FC2 machine to FC3 using the DVD ISO.  The upgrade went 
flawlessly, with one exception: there is massive amounts of package 
doubling in my rpm database.  Looks like just about every major 
pacakages has two of the exact same version installed, i.e.: 
 
[adam@onyx ~]$ rpm -q esound 
esound-0.2.35-2 
esound-0.2.35-2 
 
Since they are the exact same version I cannot uninstall the second 
one by name.  There's --allmatches, but that would uninstall both 
versions - completely infeasible, since lots of core stuff (GNOME 
libraries, xorg packages, etc) are doubled. 
 
It really seems like rpm should: 
 
1. Make it impossible to have two of the _exact_ same package version 
installed; perhaps --rebuilddb could just remove the reference to any 
doubled packages; and 
 
2. At worst, provide some option for removing all but one of a 
package.  Actually, this would be useful even in non-doubling 
situations: a command like "rpm -e --except-latest esound" which 
removed all but the latest version would be useful in lots of cases.  
In the case of doubled packages, it would remove all but one. 
 
I've run into doubled packages in the rpm database a number of times 
over the years.  In one case someone who was a Linux newbie found 
themselves screwed because they had somehow managed to install an rpm 
five or six times, but trying to remove it didn't work because of the 
"specifies multiple packages" problem.  It doesn't seem like a 
beginner should be able to get the rpm database into what is 
basically a corrupted state by something as simple as installing a 
single package.

Comment 1 Jeff Johnson 2004-12-02 00:26:46 UTC
Unfortunately, there are cases where identical NEVR *do* make
sense, multilib (i.e. elf32/elf64 arches) and --relocate being
only two cases. But yes, many users use --install, when --update
should have been used.

Easiest way to get rid of doubling is to do
    rpm -qa --last > /tmp/list
then edit list down to those N-V-R packages that you don't
want, then do
    rpm -e `cat /tmp/list`

It would not be impossible to script the mess and add --except-latest
as a popt exec, the --last option is actually a script disguised
as an option, see /usr/lib/rpm/rpmpopt* for details.

There's also ways to remove duplicated entries during
a --rebuilddb, but that doesn't clean up what's on the
file system, only entries in the rpmdb, and so not recommended.

Adding --allmatches is the answer to the other complaint, ironically
an attempt to prevent accidents by newbies.

There's no pleasing everyone.

Comment 2 Paul Nasrat 2004-12-02 22:13:15 UTC
Also you can do:

rpm --qf '%{name}-%{version}-%{release}.%{arch}' -qf esound

Probaby x86_64 and i386 installed

rpm -e esound.i386 should work as desired.




Note You need to log in before you can comment on or make changes to this bug.