docs/ref/uninstall.md
This guide provides instructions for uninstalling Wazuh server and agent components. The uninstallation process automatically stops the service before removing the package.
Remove the package:
sudo dpkg --purge wazuh-manager
To remove the package but keep configuration files:
sudo dpkg --remove wazuh-manager
Remove the package:
sudo rpm -e wazuh-manager
Remove the package:
sudo dpkg --purge wazuh-agent
To remove the package but keep configuration files:
sudo dpkg --remove wazuh-agent
Remove the package:
sudo rpm -e wazuh-agent
Remove the package:
sudo rpm -e wazuh-agent
Stop the agent service:
sudo launchctl bootout system /Library/LaunchDaemons/com.wazuh.agent.plist
Remove the package:
sudo rm -rf /Library/Ossec
sudo rm -f /Library/LaunchDaemons/com.wazuh.agent.plist
sudo rm -rf /Library/StartupItems/WAZUH
Remove the Wazuh user and group:
sudo dscl . -delete "/Users/wazuh"
sudo dscl . -delete "/Groups/wazuh"
Remove from pkgutil:
sudo pkgutil --forget com.wazuh.pkg.wazuh-agent
Uninstall the package:
msiexec.exe /x wazuh-agent-*.msi /qn
For interactive uninstallation, use the Windows "Add or Remove Programs" feature.