LLI Wiki — My Digital Knowledge Base

CentOS: remove duplicate multilib packages with package-cleanup

List and remove duplicate multilib packages with package-cleanup on CentOS, then update yum.

On CentOS, a system update can fail or leave duplicate multilib packages behind (the same package installed for several architectures). The package-cleanup tool, provided by the yum-utils package, lists these duplicates and removes them.

1. Check the yum state

yum history
yum check
yum history sync
sudo yum update

2. List the duplicates

sudo package-cleanup --dupes

3. Remove the duplicates

sudo package-cleanup --cleandupes --removenewestdupes

4. Update the system

sudo yum update

References

Mastodon LLIMastodon SocialFosstodon