Skip to content

Instantly share code, notes, and snippets.

@omundy
Last active January 30, 2020 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omundy/8549b38367a0d207c64992dd9cda737b to your computer and use it in GitHub Desktop.
Save omundy/8549b38367a0d207c64992dd9cda737b to your computer and use it in GitHub Desktop.
KILL_SOPHOS
#!/bin/bash
# orginal https://gist.github.com/lukebussey/70fe3b245c7b55fa41300670d2698e54
# make file and run sudo chmod +x kill_sophos
# delete all files
sudo rm -R /Library/Sophos*
sudo rm -R /Library/Application\ Support/Sophos*
sudo rm -R /Library/Preferences/com.sophos.*
sudo rm /Library/LaunchDaemons/com.sophos.*
sudo rm /Library/LaunchAgents/com.sophos.*
sudo rm -R /Library/Extensions/Sophos*
sudo rm -R /Library/Caches/com.sophos.*
sudo rm -R /Library/Sophos\ Anti-Virus*
# added this later
kill $(ps aux | grep 'SophosAutoUpdate' | awk '{print $2}')
kill $(ps aux | grep 'Sophos' | awk '{print $2}')
kill $(ps aux | grep '.sophos' | awk '{print $2}')
# report all that are left
ps -ax | grep Sophos
# manual prompt for me to remember kill code
echo "..."
echo "Now manually kill all that are left with:"
echo " sudo kill -9 <PID>"
echo "..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment