Description of problem: If yum is interrupted or dies before it can do the cleanup phase after the package installations, it leaves duplicate entries in the rpm database that must be cleaned manually with rpm -e Version-Release number of selected component (if applicable): How reproducible: Always. run yum update, cause yum to die sometime during the middle of the operation. Packages that have not hit the cleanup stage have duplicates in the rpm database. For example, I did a yum update and in the middle of it, asked gnome-terminal to open a new window. Instead gnome-terminal crashed, taking yum with it. This can cause the yum duplicate packages problem. Or if you were doing yum update over an ssh connection and lost the connection midway through the yum update. Happens more often than I'd like to admit. Steps to Reproduce: 1. run yum update 2. yum dies in the middle (killed or controlling terminal crashes) 3. rpm -qa and notice duplicates Actual results: duplicate packages Expected results: well, frankly I expect this result. The problem is how to either prevent it from happening or provide a tool to cleanup later. Additional info: Perhaps yum needs a commandline option to go back and make sure all the cleanup has been done from the last yum run.
There's not really any way to fix it within yum.
Maybe a tool needs to be created to clean up after yum. either that or have yum keep a log of transactions so that if yum gets interrupted, another run of yum can clean up the mess. A third alternative is to make yum complete each rpm transaction individually, much like the rpm command does. I can't remember how up2date worked, but I don't think I've ever seen up2date have this same issue. Now that RHEL5 is using yum, I would think this bug could have the potential to cause some very interesting problems in critical production systems, even if the probability of anyone seeing this problem is very small.