2. Unistall Server Agent
Last updated
Guide for uninstalling the Monitoring Agent (your .deb packaged agent) with different scenarios explained:
sudo systemctl stop monitoring-agent
sudo systemctl disable monitoring-agentEnsures the agent is not running anymore.
disable prevents it from starting on boot.
There are two main ways to uninstall Debian packages:
Remove (keep configuration files)
sudo dpkg -r monitoring-agentRemoves the package binaries, but keeps configs in /etc/monitoring-agent/ (if you had any).
Useful if you plan to reinstall and keep previous settings.
Purge (remove everything)
sudo dpkg -P monitoring-agentCompletely removes binaries and configuration files.
Use this if you want a fresh clean uninstall.
If logs or runtime data are stored outside the package (e.g., in /var/lib/monitoring-agent/ or /var/log/monitoring-agent/), you may want to remove them manually:
With this, you can:
Stop and disable the service.
Remove or purge the package depending on whether you want to keep configs.
Last updated
sudo rm -rf /var/lib/monitoring-agent
sudo rm -rf /var/log/monitoring-agent
sudo rm -rf /etc/monitoring-agent