Uninstallation
We understand that LinuxGuard may not be the right fit for every environment. When you decide to remove the agent, we ensure a complete and clean removal process that leaves no traces behind.
Complete Cleanup
The LinuxGuard uninstallation process is designed to completely remove the agent and all associated components from your system:
Agent unenrollment: The agent automatically unenrolls from your tenant before removal
Service cleanup: The agent service is stopped and disabled
File removal: All configuration files, state data, and logs are removed
User cleanup: The dedicated
linuxguarduser and group accounts are removedComplete removal: No traces of the agent remain on your system
Uninstallation Methods
The uninstallation process varies slightly depending on your Linux distribution's package manager.
Debian-based Systems
For Debian, Ubuntu, and other Debian-based distributions:
Remove the agent (keeps configuration files):
sudo apt remove linuxguard-agentRemove the agent and all configuration files (complete cleanup):
sudo apt purge linuxguard-agentThe purge command ensures complete removal of all agent files, including:
Configuration files in
/etc/linuxguard/State files in
/var/lib/linuxguard/Log files in
/var/log/linuxguard/Runtime files in
/var/run/linuxguard/The
linuxguarduser and group accounts
RedHat-based Systems
For RHEL, CentOS, Fedora, and other RedHat/YUM-based distributions:
Remove the agent:
sudo dnf remove linuxguard-agentOr for older systems using YUM:
sudo yum remove linuxguard-agentOn RedHat-based systems, the remove command automatically performs a complete cleanup, removing all agent files, configuration, and user accounts.
Alpine-based Systems
For Alpine Linux:
Remove the agent:
sudo apk del linuxguard-agentThe Alpine package manager automatically removes all agent files and performs complete cleanup.
What Happens During Uninstallation
The uninstallation process follows these steps:
Pre-removal cleanup:
The agent automatically unenrolls from your LinuxGuard tenant
The agent service is stopped
The agent service is disabled to prevent it from starting on boot
Package removal:
The agent package is removed from your system
All agent binaries and files are removed
Post-removal cleanup (on Debian-based systems with
purge):All configuration directories are removed (
/etc/linuxguard/)All state directories are removed (
/var/lib/linuxguard/)All log directories are removed (
/var/log/linuxguard/)All runtime directories are removed (
/var/run/linuxguard/)The
linuxguarduser account is removedThe
linuxguardgroup account is removed
Verification
After uninstallation, you can verify that the agent has been completely removed:
# Check if the agent binary is removed
which linuxguard-agent
# Verify the agent user no longer exists
id linuxguard
# Check if agent directories are removed
ls -la /etc/linuxguard
ls -la /var/lib/linuxguard
ls -la /var/log/linuxguard
# Verify the service is removed
systemctl status linuxguard-agentAll of these commands should indicate that the agent and its components have been removed.
Removing the Repository (Optional)
If you no longer need the LinuxGuard repository on your system, you can remove it:
Debian-based Systems
# Remove the repository file
sudo rm /etc/apt/sources.list.d/linuxguard.list
# Remove the GPG key
sudo rm /etc/apt/trusted.gpg.d/linuxguard.gpg
# Update package cache
sudo apt updateRedHat-based Systems
# Remove the repository file
sudo rm /etc/yum.repos.d/linuxguard.repo
# Or for DNF
sudo rm /etc/dnf/repos.d/linuxguard.repo
# Clean package cache
sudo dnf clean all
# Or
sudo yum clean allAlpine-based Systems
# Remove the repository from /etc/apk/repositories
sudo sed -i '/linuxguard/d' /etc/apk/repositories
# Update package index
sudo apk updateContainer Uninstallation
If you installed the agent in a container, simply remove the container:
# Docker
docker stop <container-name>
docker rm <container-name>
# Kubernetes
kubectl delete pod <pod-name>If you used volumes for persistence, you may also want to remove those:
# Docker
docker volume rm linuxguard-data linuxguard-logs
# Kubernetes volumes are automatically cleaned up when pods are deletedTenant Cleanup
After removing the agent from your systems, you may want to:
Remove the agent from your console: The agent will automatically disappear from your console after unenrollment, but you can also manually remove it if needed
Review your tenant: Consider whether you want to keep your tenant account active or contact [email protected] to close your account
Need Help?
If you encounter any issues during uninstallation or have questions about the removal process, our support team is here to help:
Email: [email protected]
Available: 24/7
We're committed to making the uninstallation process as smooth and complete as possible.
Related: Installation | Troubleshooting | Support
Last updated
Was this helpful?