Stop Services
Kill all running CloudPanel services and disable them from startup:
Bash
sudo systemctl stop nginx mysql php*-fpm
sudo systemctl disable nginx mysql php*-fpm
Wipe Directories
Remove all configuration, log, and database directories associated with CloudPanel:
sudo rm -rf /etc/cloudpanel /home/cloudpanel /etc/nginx /etc/php /var/lib/mysql /var/log/mysql /etc/mysqlPurge Packages
Completely remove Nginx, PHP, and MySQL packages from the system:
sudo apt-get remove --purge -y nginx mysql-server mysql-client mysql-common php*
sudo apt-get autoremove -y
sudo apt-get autoclean -y
Delete Users
Get rid of the cloudpanel and nginx system users along with their home directories:
sudo deluser --remove-home cloudpanel
sudo deluser --remove-home nginxAll-in-One Command
Run this one-liner if you want to automate the entire cleanup process:
sudo bash -c 'systemctl stop nginx mysql php*-fpm || true; systemctl disable nginx mysql php*-fpm || true; rm -rf /etc/cloudpanel /home/cloudpanel /etc/nginx /etc/php /var/lib/mysql /var/log/mysql /etc/mysql; apt-get remove --purge -y nginx mysql-server mysql-client mysql-common php*; apt-get autoremove -y; apt-get autoclean -y; deluser --remove-home cloudpanel || true; deluser --remove-home nginx || true; echo "CloudPanel removed. System is clean."'
Reboot
Restart the server to ensure all processes are fully cleared:
sudo rebootNote: If you don't care about the data, a fresh OS reload from your VPS panel is always the cleanest way.
