Introduction
After installing or removing a provider of EasyApache 4 packages such as CloudLinux or Imunify360, it may be necessary to replace the packages from the old provider with the packages provided by the new provider. If packages are installed from more than one source for EasyApache 4 packages, or more than one EasyApache 4 repository is enabled, this will eventually lead to package dependency issues.
Procedure
First, every provider's repository should be disabled except for the provider you intend to use. The repositories will be located in the /etc/yum.repos.d/ directory. You can disable a repository by changing the "enabled=1" lines to "enabled=0".
Once the provider's repositories have been set so that only the intended repository is enabled, you will need to use YUM to replace the packages. This can be done in SSH as root as follows.
1) Compile a list of EasyApache 4 packages to be replaced.
PACKAGES=$(rpm -qa --queryformat "%{NAME}\n"|grep "^ea-"|tr '\n' ' ')
2) Replace the packages from the command above with the packages from cPanel's EA4 repository.
yum swap -- remove $PACKAGES -- install $PACKAGES
3) Review the summary of operations that YUM will be performing in the command above. This should show the packages being removed from the unintended providers' repositories and installed from the intended provider's repository. If some packages are already installed from the correct repository, they will be reinstalled. If everything looks good, proceed by typing "y" and pressing enter.