any existing script to fix the problem ?? -- Re: Help: aborted 'yum upgrade' and corrupted rpm database resulted
Sam Varshavchik
mrsam at courier-mta.com
Sat Apr 29 01:33:46 UTC 2006
Robinson Tiemuqinke writes:
> 3, feed the obsolete versions into "rpm -e --justdb":
>
> rpm -e --justdb `cat /var/tmp/obsoletes`
I would not recommend the --justdb option. It many cases, remnants of the
old package are still there, and should really be removed. With --justdb,
the RPM database gets updated, but the old, obsolete files, may still be
there and could cause some confusion in the future.
The procedure I used was:
1. Run rpm --rebuilddb, to make sure the RPM database is clean
2. rpm -q -a --queryformat '%{NAME}.%{ARCH}\n' | sort | uniq -c | sort -n
This gave me the list of all packages and how many versions of each are
installed. Some packages with >1 count, namely kernel and gpg-pubkey, are
legitimate.
3. I took all the rest, ran rpm -q on them all, to get the actual versions
that were installed, according to rpm. And manually edited the output to
contain only the obsolete versions, then fed the results to plain old 'rpm
-e'.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20060428/03077e8a/attachment-0002.bin
More information about the users
mailing list