You are currently viewing How to Uninstall CloudLinux from cPanel

How to Uninstall CloudLinux from cPanel

Uninstalling CloudLinux from a cPanel server can be a meticulous process, but with the right steps and attention to detail, it can be done effectively. CloudLinux is a popular operating system used to enhance server stability and security, but there may be situations where you need to revert to a standard CentOS distribution. This guide will walk you through the entire process, ensuring you have all the information needed for a smooth transition.

This blog is a part of our cPanel server management services where we make sure your cPanel server works efficiently with any issues.

Prerequisites

Before beginning the uninstallation process, ensure you have the following:

  • Root access to your server.
  • A full backup of your server data.
  • Basic knowledge of using SSH and command-line interfaces.

Step-by-Step Uninstallation Process

Step 1: Prepare Your Server

Backup Your Data:

Ensure you have a complete backup of your server. This is crucial as the uninstallation process can lead to data loss if not handled properly.

tar -czf backup-$(date +%F).tar.gz /path/to/important/data

Check the Current Version:

Verify the current version of CloudLinux and cPanel installed on your server.

uname -r

rpm -qa | grep cloudlinux

Step 2: Remove CloudLinux Packages

Switch to CentOS Kernel:

First, you need to switch from the CloudLinux kernel to the CentOS kernel. List the available kernels:

rpm -qa | grep kernel

Install the CentOS kernel if not already installed:

yum install kernel

Set the default kernel to the CentOS kernel by editing the GRUB configuration file. Open /etc/grub.conf or /boot/grub/grub.conf in a text editor and set the default to the CentOS kernel.

default=<centos-kernel-index>

Reboot the Server:

Reboot your server to boot into the CentOS kernel.

reboot

After the reboot, verify that the server is running the CentOS kernel:

uname -r

Remove CloudLinux RPM Packages:

Uninstall all CloudLinux packages:

yum remove liblve lve-utils lve-stats alt-python27-cllib cagefs lvemanager rhn-check rhn-client-tools rhnlib rhn-setup rhn-setup-gnome yum-rhn-plugin

Step 3: Convert Back to CentOS

Restore CentOS Repositories:

Replace the CloudLinux repositories with the original CentOS repositories. Remove the CloudLinux repository configuration files:

rm -f /etc/yum.repos.d/cloudlinux.repo

Restore the CentOS repository files. You may need to download the CentOS repository configuration package and install it:

yum install centos-release

Sync with CentOS Repositories:

Clean the YUM cache and sync the packages with the CentOS repositories:

yum clean all

yum update

Step 4: Final Cleanup

Reinstall Necessary Packages:

Reinstall any necessary packages that were removed during the process to ensure that cPanel functions correctly. For example:

yum install -y perl ruby

Verify the cPanel Installation:

Run the cPanel installation script to verify and repair the cPanel installation:

/scripts/upcp –force

Reboot the Server:

Finally, reboot the server to ensure all changes take effect:

reboot

Step 5: Post-Uninstallation Checks

Check Kernel Version:

After the final reboot, ensure the server is running the correct CentOS kernel:

uname -r

Verify cPanel Functionality:

Log in to the cPanel interface and verify that all services are running correctly. Check for any errors and resolve them as needed.

Monitor Server Performance:

Monitor the server for a few days to ensure stability and performance are as expected. Pay attention to server logs and performance metrics.

Conclusion

Uninstalling CloudLinux from cPanel is a process that requires careful execution to avoid disrupting server operations. By following the steps outlined above, you can successfully revert your server back to a standard CentOS distribution. Remember to take necessary precautions, such as backing up your data and verifying each step, to ensure a smooth transition.

If you encounter any issues during the process, consider reaching out to SupportFly. Our experts will help you with all your queries and issues. Properly handling the uninstallation will help maintain the stability and security of your server environment.