cPanel: Uninstall CloudLinux

It is not hard to install CloudLinux, but you will found more step to uninstall it.

Before you convert CloudLinux back to normal Centos, you shall check if your box come with CloudLinux,
/usr/local/cpanel/bin/cloudlinux_system_install -c

1. Update CentOS RPMs.
yum upgrade -y
2. Rebuild Apache
/usr/local/cpanel/scripts/easyapache –build
3. Reinstall a non-CloudLinux kernel.
yum –disableexcludes=all install kernel
4. Remove the CloudLinux-provided kernel.
rpm -qa |awk ‘/^kernel.*lve/ {print $1|”xargs yum -y erase”}’
5. Reinstall any CloudLinux-provided RPMs
rpm -qa –qf “[%{VENDOR} %{NAME}\n]”|awk ‘/CloudLinux/ {print $2|”xargs yum reinstall -y”}’
6. Downgrade any CloudLinux-provided RPMs to the appropriate CentOS version.
rpm -qa –qf “[%{VENDOR} %{NAME}\n]”|awk ‘/CloudLinux/ {print $2|”xargs yum downgrade -y”}’

7. Remove remaining CloudLinux-provided RPMs that do not have a CentOS equivalent.
rpm -qa –qf “[%{VENDOR} %{NAME}\n]”|awk ‘/CloudLinux/ {print $2|”xargs yum erase -y”}’
8. Upgrade any of the CentOS RPMs that were downgraded in step 7.
yum upgrade -y
9. Reboot your server into the non-CloudLinux kernel.
shutdown -r now

  1. Update your CentOS-provided RPMs.
    • yum upgrade -y
  2. Rebuild Apache and prevent linking to liblve.
    • /usr/local/cpanel/scripts/easyapache --build
  3. Reinstall a non-CloudLinux kernel. This step is necessary because the CloudLinux kernel RPM introduces new dependencies into the RPM database that will prevent subsequent attempts to remove any remaining CloudLinux components.
    • yum --disableexcludes=all install kernel
  4. Remove the CloudLinux-provided kernel.
    • rpm -qa |awk '/^kernel.*lve/ {print $1|"xargs yum -y erase"}'
  5. Reinstall any CloudLinux-provided RPMs that are also provided by CentOS. The following command will review the CloudLinux-provided RPMs and issue a yum install command for each RPM that it finds.
    • rpm -qa --qf "[%{VENDOR} %{NAME}\n]"|awk '/CloudLinux/ {print $2|"xargs yum reinstall -y"}'
  6. Downgrade any CloudLinux-provided RPMs to the appropriate CentOS version. The following command will iterate through the remaining CloudLinux RPMs and issue a yum downgrade command for each.
    • rpm -qa --qf "[%{VENDOR} %{NAME}\n]"|awk '/CloudLinux/ {print $2|"xargs yum downgrade -y"}'
    • note Note: This may result in older RPMs being installed on the system; however, we will update them later.
  7. Remove remaining CloudLinux-provided RPMs that do not have a CentOS equivalent. These remaining RPMs are specific to CloudLinux. The following command will iterate through your RPMs and issue a yum erase -y command for each:
    • rpm -qa --qf "[%{VENDOR} %{NAME}\n]"|awk '/CloudLinux/ {print $2|"xargs yum erase -y"}'
  8. Upgrade any of the CentOS RPMs that were downgraded in step 7.
    • yum upgrade -y
  9. Reboot your server into the non-CloudLinux kernel. This final step will ensure that your server has returned to its pre-CloudLinux state.
    • shutdown -r now

Published by

Mick Genie

Mick Genie is the founder of MickGenie.com and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.

3 thoughts on “cPanel: Uninstall CloudLinux”

Comments are closed.