Re: any existing script to fix the problem ?? -- Re: Help: aborted 'yum upgrade' and corrupted rpm database resulted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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'.


Attachment: pgpIJMeHQQnr1.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux