Skip to content

Instantly share code, notes, and snippets.

@triti
Forked from williamjacksn/uninstall-clamxav.sh
Created July 5, 2012 20:26
Show Gist options
  • Save triti/3056235 to your computer and use it in GitHub Desktop.
Save triti/3056235 to your computer and use it in GitHub Desktop.
Bash: Uninstall ClamXav
#!/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
@AsyaKarapetyan
Copy link

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment