Uninstalling Sophos Linux Sensor (systemd)
Overview
This article addresses how you can manually uninstall or delete Sophos Linux Sensor (SLS) and associated configuration files using the systemd package manager.
Uninstalling SLS on Ubuntu
Follow the below steps to uninstall SLS running on your Linux environment:
-
Search to see the SLS package running on your Linux environment using the following command:
sudo apt list --installed | grep sophos
Sample Output:
sophoslinuxsensor-systemd/now 5.0.0.28 amd64 [installed,local]
-
Remove SLS. Run the following command:
sudo apt remove sophoslinuxsensor-systemd
Sample Output:
The following packages will be REMOVED: sophoslinuxsensor-systemd Do you want to continue? [Y/n] Removing sophoslinuxsensor-systemd (5.0.0.28) ...
-
Remove SLS content. Run the following command:
sudo apt remove sophoslinuxcontent
-
Remove associated configuration files. Run the following commands:
rm -r /var/lib/sophos rm -r /run/sophos rm -r /etc/sophos userdel sophos-spl-user
Uninstalling SLS on Redhat/CentOS/Amazon
Follow the below steps to uninstall SLS running on your Linux environment.
-
Search to see the SLS package running on your Linux environment using the following command:
yum list installed | grep sophos
Sample Output:
sophoslinuxsensor-systemd.x86_64 5.0.0.28-1 @/sophoslinuxsensor-systemd-5.0.0.28-1.x86_64
-
Remove SLS and content. Run the following command:
sudo yum remove sophoslinuxsensor-systemd.x86_64
Sample Output:
Dependencies Resolved =========================================================================================================================================== Package Arch Version Repository Size =========================================================================================================================================== Removing: sophoslinuxsensor-systemd x86_64 5.0.0.28-1 @/sophoslinuxsensor-systemd-5.0.0.28-1.x86_64 75 M Transaction Summary =========================================================================================================================================== Remove 1 Package Installed size: 75 M Is this ok [y/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Erasing : sophoslinuxsensor-systemd-5.0.0.28-1.x86_64 1/1 Verifying : sophoslinuxsensor-systemd-5.0.0.28-1.x86_64 1/1 Removed: sophoslinuxsensor-systemd.x86_64 0:5.0.0.28-1 Complete!
-
Remove SLS content. Run the following command:
sudo yum remove sophoslinuxcontent
-
Remove associated configuration files. Run the following commands:
rm -r /var/lib/sophos rm -r /run/sophos rm -r /etc/sophos userdel sophos-spl-user