FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

LinkBack Thread Tools
Old 06-25-2008, 01:39 PM
Karanbir Singh
Default Broken upgrade to 5.2 {solved - I hope}

Tim Verhoeven wrote:

The best way to remove duplicate package is using rpm itself and the
--justdb switch. This will only remote entries inside the RPM database
and not on the filesytem itself. If you remove the newest version of
the duplicate packages you can run the yum update again and it will
reinstall the newer versions and all should be good.

might also want to look at the package-cleanup script included in

- KB
CentOS mailing list
Old 06-25-2008, 07:01 PM
Scott Silva
Default Broken upgrade to 5.2 {solved - I hope}

on 6-25-2008 5:27 AM Ian Blackwell spake the following:
Thanks to all that offered advice to help solve this for me. Here's a
round up for those that may follow in similarly ill-fated foot-steps.

1. Don't update/upgrade remotely without using "screen". Dropping the
ssh session caused yum to die inelegantly, with duplicate packages in
the RPM database.

2. Analysing the output from
/bin/rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm
' | sort
led me to erase almost 30 new packages that appeared to be duplicates of
existing packages. This wasn't without problems though, because I used
this command:-

yum erase libgcc-4.1.2-42.el5.i386
to remove the duplication noticed here:-
3. This broke the machine badly, and caused yum to stop working
completely with missing libgcc_s.so.1 being reported as the cause. This
also effected other programs, e.g. man wasn't working either. Anyway,
long story short, I booted from the 5.1 DVD in rescue mode. I was
reluctant to reboot the box in a half upgraded state, but was forced
into this due to the corrupt libgcc problem. I then forced the
reinstallation of libgcc-4.1.2-14.el5.i386 from the DVD using:-

rpm -ivh --force --root /mnt/sysimage libgcc-4.1.2-14.el5.i386.rpm
This worked OK and the machine rebooted without a problem (what a relief).
4. Next I tried the yum -y upgrade process again (from the console this
time), and to my enormous delight, it downloaded the packages I had
removed earlier and then passed all transaction tests and started to
process the 577 steps left to upgrade to 5.2.
5. I think there may still be some duplicates, which I'll check for
after the upgrade has completed. I didn't get all the way through my
analysis of the duplicate package list because of the broken libgcc
issue. Having resolved this with the rescue boot, I took a punt on
"having done enough" and restarted "yum upgrade". Since it worked, I
decided against interrupting it with the view to a subsequent

All being well, I should have an upgraded machine fairly soon.

Thanks again for your prompt and enlightened assistance 8-)


Something I used on a 4.3 borked upgrade is the following;

for file in `rpm -qa --queryformat="%{NAME} %{ARCH}
" | sort | uniq -c | grep
-v " 1 " | cut -c 9- | cut -d" " -f1`; do rpm -q --last $file |tail -1 | cut
-d" " -f1; done | grep -v gpg-pubkey | xargs rpm -e

--justdb --nodeps 2> /tmp/dupes


Watch the linewraps.

Oh hell, I'll attach it also for posterity!

MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!
CentOS mailing list

Thread Tools

All times are GMT. The time now is 09:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org