-
-
Save triti/3056235 to your computer and use it in GitHub Desktop.
Bash: Uninstall ClamXav
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for path in /Users/*; do | |
# Parameter expansion to remove the home directory path and leave just the basename | |
user="${path##*/}" | |
# Remove ClamXav crontab entries | |
crontab -u "$user" <(crontab -u "$user" -l 2>/dev/null | grep -v "freshclam" | grep -v "clamscan") | |
done | |
find /Users ( -name "uk.co.markallan.clamxav.clamscan.plist" -or -name "uk.co.markallan.clamxav.freshclam.plist" ) -execdir launchctl unload -w "{}" \; | |
find /Users -name "uk.co.markallan.clamxav.*" -delete | |
rm -r /Library/Receipts/clamav* | |
rm -r /Library/Receipts/ClamAV* | |
rm -r /usr/local/clamXav | |
rm -r /Applications/ClamXav.app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I was preparing a guide for non-geeks on how to uninstall ClamXAV from Mac, I also found the ClamXAV's support files in these locations:
~/private/var/db/receipts
~/private/var/folder/I8/…
Should I add files from these locations to the command rm -r ?