Fortunately, I had written a utility over a year ago to solve that problem. A combination of power failure and the UPS system battery running down in the middle of an upgrade had left my system in an inconsistent state. The utility pieces were as follows. I'd created a dictionary of package names with attributes like the version, release, arch, etc, which would help identify duplicates.

Especially on an x86-64 architecture, a package with the same name may occur for i386 architecture as well. Hence, that is not a duplicate. You need to check whether there are any duplicates for each name and arch combination. The actual work of checking duplicates is done in chk_dups. Assume that there is only one package with the maximum version.If I were writing this program today, I would have avoided the filter function and used list comprehension instead. For example.

Name:  Write scripts-you may need them again.jpg
Views: 22
Size:  26.6 KB

While I could have deleted the RPMs in the program, I felt more comfortable getting a list of duplicate package names and then deleting them from the command line. Now as the root user ,I ran:Having deleted some packages, I needed to get a fresh list of the installed packages and those that failed the verification.
The next step was to reinstall all the packages with problems. Since the RPMs were in various subdirectories of /var/cache/yum, I collected all of them in /opt/yuml RPMSI.

Some downloaded packages were lost. So, the final step was to use yum update to update the missing packages, On the first occasion I had to reinstall from scratch, it had taken me well over two days to fully recover. Most of the time was spent downloading updates and packages not on the distribution DVD. Partly, it is hard to remember all the additional packages installed, My memory was often triggered by a high-interrupt from my wife-for example, "Where's Sylpheed?"

This time, I recovered the system in little over a day; with more than half the time spent in figuring out the issues and developing the code, But now if the system winds up in the same state, I am sure I can recover in much less than half a day,
Actually, I will recover much faster because I now have a dual-boot system. I bought another disk and have a fully configured installation on that disk as well.