Uninstalling cPGuard
Uninstalling cPGuard is a quick and straightforward process. Whether you are decommissioning a server, migrating to a new one, or simply switching security solutions, this guide walks you through the complete uninstallation process.
Before You Uninstall — License Considerations
If your intention is to move cPGuard to a new server rather than permanently remove it, you should handle the license before uninstalling. Once cPGuard is uninstalled, the license is released from the server and the server is removed from the App Portal.
If you plan to reuse your cPGuard license on a different server or after an IP change, follow the Migrate License to a New Server or IP Address guide before proceeding with uninstallation.
Uninstall cPGuard
Run the following single command on your server as root via SSH to download and execute the cPGuard uninstaller:
cd /usr/local/src && rm -f cpguard_uninstall.sh && curl -o cpguard_uninstall.sh -L https://downloads.opsshield.com/cpguard/cpguard_uninstall.sh && bash cpguard_uninstall.sh
What the uninstaller does:
- Downloads the latest cPGuard uninstaller script
- Removes all cPGuard packages and installed files from the server
- Removes the cPGuard agent service
- Detaches the server from your cPGuard App Portal account
That's it — the uninstallation is complete.
The uninstall script does not delete your website files, databases, or any hosted content. It only removes cPGuard-specific packages, services, configurations, and quarantine data.
After Uninstalling
Once cPGuard is uninstalled:
- The server will no longer appear in the cPGuard App Portal
- WAF protection, malware scanning, and IP reputation checks will stop
- If you plan to reinstall cPGuard on this server in the future, simply run the installation command again with your license key
After uninstalling, your server will have no active web application firewall or malware scanner from cPGuard. Ensure you have an alternative security solution in place if the server remains in production.
Need Help?
If you encounter any issues during uninstallation or the script fails to complete, the OPSSHIELD support team is available to help. You can raise a support ticket directly from the client portal:
You can also grant the support team SSH access to your server so they can assist directly.