ClamAV is a free, open-source antivirus engine that does not run as a typical Mac app with a menu-bar icon; you install it through a package manager or the official installer and then scan files and folders from Terminal. The most common mistake is expecting a real-time shield that blocks downloads automatically the way commercial Mac antivirus tools do. ClamAV scans on demand, so you point it at a file, a folder, or a whole home directory and read the results in the Terminal window.
On macOS, ClamAV is usually installed with Homebrew, the long-standing package manager, using a command such as brew install clamav. If you prefer not to use Homebrew, the ClamAV project publishes a macOS installer package, but the Terminal workflow below is the same either way.
How Do You Install ClamAV on a Mac?
Installation has three parts: get the engine, prepare the configuration files, and update the virus database. Labels and menu names can differ by macOS version, so treat the paths below as the standard pattern rather than an exact match for every release.
1. Open Terminal from Applications > Utilities.
2. If Homebrew is installed, run brew install clamav. If it is not installed, install Homebrew first from its official site, then repeat the command.
3. Create the configuration files. Homebrew installs sample files named freshclam.conf.sample and clamd.conf.sample in the Homebrew etc directory. Copy each to a working name without the .sample suffix, for example freshclam.conf and clamd.conf.
4. Open each copied file in a plain text editor and delete or comment out the line that begins with Example. ClamAV refuses to run while that placeholder line is present.
5. Run freshclam to download the virus signature databases. The first download is large, typically a few hundred megabytes, so allow several minutes on a slow connection.
6. Confirm the install by running clamscan --version. It prints the engine and database versions.
How Do You Scan a File or Folder With ClamAV?
The basic scan command is clamscan followed by a path. To scan your Downloads folder, run clamscan -r ~/Downloads. The -r flag means recursive, so every subfolder is checked. Without it, ClamAV looks only at the top level.
Useful options to add:
--infected prints only files that matched a signature, which keeps the output readable on a large folder.
--bell sounds the terminal bell on a detection.
-l scan.log writes the full report to a file you can review later.
A scan of a single downloaded installer typically finishes in seconds. A full home folder with tens of thousands of files can take from several minutes to over an hour depending on disk speed and file count. ClamAV reports the number of scanned files and infected files at the end, so read the last few lines rather than scrolling the whole log.
What Do the Scan Results Mean?
ClamAV prints one line per detection in the form path: SignatureName FOUND. The signature name identifies the malware family the database matched. A clean run ends with a summary showing zero infected files.
Two result types cause most confusion. A false positive is a harmless file that matches a signature; legitimate installers and some developer tools occasionally trigger one. A packed or heuristic detection means the file looks suspicious by structure rather than matching a known virus exactly.
If ClamAV flags a file you trust, do not delete it immediately. Move it to a quarantine folder, upload it to a multi-engine scanning service for a second opinion, and check whether the signature name refers to a known false-positive pattern. If several engines agree, treat the file as malicious.
How Do You Keep the Virus Database Current?
ClamAV only detects what its signature database knows, so updating matters more than the initial scan. Run freshclam manually before each scan session, or schedule it. On macOS you can schedule freshclam with a launch agent so it runs daily in the background.
Signatures are typically updated several times a day, so a database more than a day old misses recent threats. If freshclam fails with a permission error, check that the database directory is writable by your user account; Homebrew installs sometimes place it under a root-owned path.
What ClamAV Does Not Do on a Mac
ClamAV is a scanner, not a full endpoint security suite. It does not block a malicious download before it lands, does not monitor running processes in real time by default, and does not remove infections automatically unless you pass a removal flag or delete the file yourself.
macOS also has built-in protections, including Gatekeeper, which checks app signatures before launch, and XProtect, which updates Apple's own malware definitions automatically. ClamAV complements those tools rather than replacing them, and it is most useful for scanning files you received from elsewhere, checking archives before you open them, and screening a folder after a suspicious download.
A worked example: suppose you download a zip archive of documents from an unfamiliar sender. Save it, run clamscan ~/Downloads/archive.zip, and read the summary. If it reports one infected file, extract nothing further, move the archive to the Trash, empty it, and change any passwords that were stored in those documents. If it reports zero, you can open the archive, but still avoid enabling macros in any document it contains.
To remove a detected file, delete it in Finder or run clamscan --remove on the specific path. The --remove flag deletes files without confirmation, so use it deliberately and keep a backup of anything you are unsure about.
Is ClamAV Enough Protection for a Mac?
For most home users, ClamAV plus macOS's built-in Gatekeeper and XProtect covers the common cases: scanning downloads, checking email attachments you saved to disk, and verifying files shared from other computers. It is not a substitute for cautious behavior, and it will not catch a threat that never touches a file ClamAV scans.
If you handle sensitive data, run a small business, or regularly open files from unknown sources, a commercial Mac security product with real-time monitoring adds a layer ClamAV lacks. Either way, keep the signature database current, scan new downloads before opening them, and treat any detection as a prompt to investigate rather than an automatic all-clear.