#Installing ClamAV using Homebrew on MacOS
- Homebrew
- MacOS
- Open terminal
- If you previously installed clamav then run the following commands
sudo killall clamd brew uninstall clamav sudo rm -rf /usr/local/var/lib/clamav sudo rm -rf /usr/local/var/clamav cd /Library/LaunchDaemons/ && sudo launchctl unload clamav.freshclam.plist clamav.clamd.plist clamav.clamdscan.plist
- Remove old config files
sudo rm /usr/local/etc/clamav/freshclam.conf sudo rm /usr/local/etc/clamav/clamd.conf
- Navigate to a directory where you want to store this script (If no preference then run
cd ~
to navigate home) - Clone install script package
git clone https://github.com/daniellmorris/clamav-tools.git
- Navigate into cloned directory
cd clamav-tools
- Set executable permission on install script
chmod +x install-on-macos.sh
- Run install script
./install-on-macos.sh
- Go to System Preferences -> Security & Privacy -> Privacy -> Full Disk Access.
- Check clamav to enable full disk access
- Verify files are in this location by running
ls /usr/local/var/clamav/db
and making sure some files exist. Something like the following should existbytecode.cvd daily.cvd main.cvd
- To test that it works run
sudo clamdscan -m /Users
. This could take hours to finish.