Add purge.sh

This commit is contained in:
colin 2024-08-11 16:58:49 -04:00
parent 713112a707
commit 017779838a
1 changed files with 23 additions and 0 deletions

23
purge.sh Normal file
View File

@ -0,0 +1,23 @@
# Stop and disable the Wazuh manager service
sudo systemctl stop wazuh-manager
sudo systemctl disable wazuh-manager
# Stop and disable the Filebeat service
sudo systemctl stop filebeat
sudo systemctl disable filebeat
# Remove Wazuh manager package
sudo apt-get remove --purge -y wazuh-manager
# Remove Filebeat package
sudo apt-get remove --purge -y filebeat
# Clean up any remaining configuration files or dependencies
sudo apt-get autoremove -y
sudo apt-get clean
# Optionally, remove the Wazuh repository file
sudo rm /etc/apt/sources.list.d/wazuh.list
# Remove any residual directories if necessary
sudo rm -rf /var/ossec /etc/filebeat /etc/apt/sources.list.d/wazuh.list