Setting up ClamAV on macOS

— Download and install ClamAV —

ClamAV

— Create config file —

mkdir -p $HOME/opt/clamav
mkdir -p $HOME/opt/etc
cp /usr/local/clamav/etc/freshclam.conf.sample $HOME/opt/etc/freshclam.conf

— Update location of ClamAV DB inside freshclam.conf —

DatabaseDirectory /Users/YOUR_USER_NAME_GOES_HERE/opt/clamav/database

— Install ClamAV database —

/usr/local/clamav/bin/freshclam --config-file=$HOME/opt/clamav/etc/freshclam.conf

— Scan the whole drive for threats —

sudo /usr/local/clamav/bin/clamscan --database=$HOME/opt/clamav/database -i -r /