THIS ARTICLE IS INTENDED FOR ADVANCED USERS ONLY - PLEASE CONTACT SOPHOS HOME SUPPORT IF YOU ARE A PREMIUM USER AND NEED ASSISTANCE WITH THESE STEPS.
Applies to: Sophos Home for macOS
What's happening
You encounter the following issues with Sophos Home:
- You receive installation failed errors.
- You receive uninstall failed errors.
- Sophos Home does not uninstall after running the uninstaller.
-
AND you have already tried these are articles, but the issue is not solved:
Installation failed on Sophos Home Mac
Uninstalling Sophos Home on Mac Computers
Sophos Home MacOS Installer: Folder Insecurity Errors during install or uninstall
Why is this happening?
These issues may happen due to corrupted files or remnants from previous Sophos Home installation files left on the systems. It might also happen when the product is incorrectly uninstalled (i.e dragged into the trash) or when there are third party security software installations present on the system.
Note: as per our General FAQ, having more than one anti-virus program installed is not recommended. Please remove any other anti-virus program as per the manufacturer's recommended methods.
What to do
Use the uninstall script for Mac, which targets and removes Sophos Home related entries from your system. This script must be executed as Administrator.
These steps should be performed by advanced users.
Creating the script:
Video steps:
- Click on the magnifying glass at the top right of the screen to open Spotlight Search
- Type "TextEdit" , hit Enter
- Start a New Document (this opens a blank text file)
- At the top of your screen select Format---> "Make plain text" to convert the file to txt
-
Copy-paste the following into the text file:
echo "Remove Sophos Home"
sudo pkill -9 "Sophos*"
sudo rm -r /Library/Sophos\ Anti-Virus
sudo rm -r /Library/LaunchDaemons/com.sophos.*
sudo rm -r /Library/LaunchAgents/com.sophos.*
sudo rm -r /Library/Preferences/com.sophos.*
sudo rm -r /Library/Logs/Sophos\ Anti-Virus.log
sudo rm -r ~/Library/Logs/Sophos\ Anti-Virus/Scans/
sudo rm -r /Library/Application\ Support/Sophos/
sudo rm -r /Library/SophosCBR
sudo rm -r /Library/Extensions/Sophos*
sudo rm -r /Library/Frameworks/SAVI-pyexec.framework
sudo rm -r /Library/Frameworks/SAVI.framework
sudo rm -r /Library/Frameworks/SophosGenericsCommon.framework
sudo rm -r /Library/Frameworks/SophosGenericsCore.framework
sudo rm -rf /Library/caches/com.sophos.*
sudo rm -r /Applications/Sophos
sudo rm -r /Applications/Sophos\ Anti-Virus.app
sudo rm -r /Applications/Sophos\ Home.app
sudo rm -r /Applications/Remove\ Sophos\ Anti-Virus.app/
sudo rm -r /Applications/Remove\ Sophos\ Home.app/
sudo rm -r /var/db/receipts/com.sophos.* - Click on the "X" at the top left to close TextEdit and save the file
- Name it "UninstallScript" and save it to your Desktop
-
The file name displayed on the Desktop should be: UninstallScript.txt
Making the script executable and running it:
- Click on the magnifying glass at the top right of the screen to open Spotlight Search
- Type "Terminal", hit Enter
-
Type the following commands (hitting "Tab" will complete typing a file name or location).
cd Desktop/
(hit Enter. This should take you to the location where you saved the file)
chmod u+x UninstallScript.txt
(hit Enter. This allows the script to become executable)
-
Finally, type this command to start the uninstallation process
./UninstallScript.txt
(hit Enter - You will be asked to enter your computer password (not your Sophos password!), but for security reasons the Terminal will not show any characters as you type (not even stars), so it will look like you aren't typing)
Note: If you receive an error: zsh: operation not permitted, then ensure "Terminal" has Full Disk Access under via System Preferences > Security & Privacy > Privacy > Full Disk Access. If the issue persists, try running the following command and repeat step 4 -
xattr -d com.apple.quarantine ./UninstallScript.txt
- Once the script has finished, reboot your computer and re-try installing Sophos Home after removing the device from your Sophos Home Dashboard
Note: If you know the exact location of the leftovers, or if you are having problems running the script, you may run each command separately inside a Terminal, one at a time, using an Administrator account.
(#!/bin/bash AND echo “Remove Sophos Home” are not necessary if running commands manually , instead of via script). It is very important to note that not copying the full line of a command may cause unwanted deletions to occur on your Mac. Please, be careful when copy-pasting each command.