Oracle Linux: Yum Update Fails With Duplicate Package Error
When trying to use yum to update packages on a system, it fails with an error such as the following:
pkg.v.el7.x86_64" is a duplicate with "pkg.v1.el7.x86_64
To fix this issue, remove the duplicate package entries from the RPM database with the following steps:
1. Backup the files: /var/lib/rpm & /var/lib/yum
2. Download and install yum-utils-1.1.31-46.0.1.el7_5.noarch or later version.
This can be downloaded from public repository:
3. Run the command package-cleanup --dupes to get a list of duplicates:
# package-cleanup --dupes
4. Then run the following command to remove the newest version of the package from any duplicates found:
Tagged:
0