Install clamav on OSX with brew


  1. Brew package manager should be installed on your mac

To install clamav ,use the commands below

macOS High Sierra Users: brew link clamav might fail so please run the commands below

Open freshclam.conf and comment the “Example” line:

Update database:

Create a Cron job to update the database definitions

Run scan on all your files:

Once you have successfully installed clamav and you are able to launch scans, you can create a function (as we need to define arguments) to achieve the same result by adding a bit of customisation.End Goal:

  1. Create an alias command
  2. Ability to define the path of the scan

To do this you will need to find the shell you are using

Add the following function to your profile and reload the configuration

You will then be able to call clamav by using : scanner <path to be scanned>

If you have any questions please leave a comment

Leave a Reply