How To Fix Yum Duplicate Packages or Broken Dependencies

We’ve been running CentOS 6.x for a couple of years on our VPS and yesterday began a standard yum update, the process failed with many duplicated packages and dependency errors or conflicts. In this post, I will describe under what situations yum errors can occur, and how to fix them.

SSH into your server via root user

yum install yum-utils

Then run the command:

yum-complete-transaction

It’s a program which finds out incomplete or aborted yum transactions on a system and try to complete them. It looks at the transaction-all* and transaction-done* files which can normally be found in /var/lib/yum if a yum.

Several commands I use:

package-cleanup –dupes # list out duplicates
package-cleanup –cleandupes # clean up duplicates
package-cleanup –problems # list out packages with broken dependencies

Now yum commands can be run without the unfinished transactions warning. I hope it will help to resolve the issue.

Leave a Reply