How to remove duplicate packages from a failed yum transaction

Solution Verified - Updated -

Issue

  • How to remove the older versions of a package which has multiple versions installed on Red Hat Enterprise Linux?
  • After a failed yum transaction, yum-complete-transaction fails to complete and the duplicates are still present.
  • yum fails with <package_name-version1> is a duplicate with <package_name-version2>
  • package-cleanup --cleandupes fails with Error: Depsolving loop limit reached

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content