Fix yum duplicate packages

On a CentOS server, when running

It failed with following error

https://gist.github.com/serverok/c0853120baff8848054cfb598e389c3a

This is because previous “yum update” failed for some reason after package install. So no cleanup was done.

To fix, you need to use package-cleanup command.

To list all duplicate packages, run

To remove all duplicate packages, run

Now do a yum update

This will update your system and install any missing packages.

To verify if there any problem, run

Maybe run: yum groups mark install

When installing CloudLinux alt-php group, i get error.

This error is fixed by running

See yum