yum: duplicate packages problem

This problem is based on a yum update or yum install failed operation, due to a network error or failure. It happened to me while updating a Centos 7 system. During the update the network was disconnected and the update operation failed. Then after executing:

yum update

I had an error indicating that several packages had duplicates, e.g.:

...
rpm-4.11.3-25.el7.x86_64 is a duplicate with rpm-4.11.3-21.el7.x86_64
...

To cope with this problem you need to remove the new version -that was not correctly installed- from the rpm database, using the command:

rpm -e --justdb --nodeps rpm-4.11.3-25.el7.x86_64

You need to do this for all packages (above run for package rpm-4.11.3-25.el7.x86_64) marked as duplicates in the yum check command. Then, just do a normal update:

yum update

and the system will download the newest versions of all packages.

To resolve this issue I was helped by this thread @ centos forums

Αφήστε μια απάντηση

Η ηλ. διεύθυνση σας δεν δημοσιεύεται. Τα υποχρεωτικά πεδία σημειώνονται με *