FreeBSD 15

Install Clam AntiVirus2026/01/23

 

Install Clam AntiVirus to protect your System from Computer Virus.

[1] Install Clamav.
root@dlp:~ #
pkg install -y clamav
root@dlp:~ #
vi /usr/local/etc/freshclam.conf
# line 167 : comment out if you do not use clamd

#
NotifyClamd /usr/local/etc/clamd.conf
# update pattern files manually

root@dlp:~ #
freshclam

ClamAV update process started at Fri Jan 23 10:19:17 2026
daily database available for download (remote version: 27888)
Time:    2.5s, ETA:    0.0s [========================>]   22.26MiB/22.26MiB
Time:    0.5s, ETA:    0.0s [========================>]    8.87KiB/8.87KiB
Testing database: '/var/db/clamav/tmp.ab31093a64/daily.cvd' ...
Database test passed.
daily.cvd updated (version: 27888, sigs: 354839, f-level: 90, builder: svc.clamav-publisher)
main database available for download (remote version: 63)
Time:    7.0s, ETA:    0.0s [========================>]   84.95MiB/84.95MiB
Time:    0.5s, ETA:    0.0s [========================>]    8.87KiB/8.87KiB
Testing database: '/var/db/clamav/tmp.ab31093a64/main.cvd' ...
Database test passed.
main.cvd updated (version: 63, sigs: 3287027, f-level: 90, builder: tomjudge)
bytecode database available for download (remote version: 339)
Time:    0.1s, ETA:    0.0s [========================>]  275.10KiB/275.10KiB
Time:    0.5s, ETA:    0.0s [========================>]    8.87KiB/8.87KiB
Testing database: '/var/db/clamav/tmp.ab31093a64/bytecode.cvd' ...
Database test passed.
bytecode.cvd updated (version: 339, sigs: 80, f-level: 90, builder: nrandolp)

root@dlp:~ #
service clamav_freshclam enable

clamav_freshclam enabled in /etc/rc.conf
root@dlp:~ #
service clamav_freshclam start

[2] Try to scan your system.
# scan [/home]

root@dlp:~ #
clamscan --infected --remove --recursive /home
----------- SCAN SUMMARY -----------
Known viruses: 3627255
Engine version: 1.5.1
Scanned directories: 27
Scanned files: 57
Infected files: 0
Data scanned: 69.80 KiB
Data read: 42.85 KiB (ratio 1.63:1)
Time: 8.839 sec (0 m 8 s)
Start Date: 2026:01:23 10:22:45
End Date:   2026:01:23 10:22:54

# download trial virus

root@dlp:~ #
fetch https://files.trendmicro.com/products/eicar-file/eicar.com

eicar.com                                               68  B  112 kBps    00s

root@dlp:~ #
clamscan --infected --remove --recursive .

# test virus is detected and removed

/root/eicar.com: Eicar-Test-Signature FOUND
/root/eicar.com: Removed.

----------- SCAN SUMMARY -----------
Known viruses: 3627255
Engine version: 1.5.1
Scanned directories: 2
Scanned files: 10
Infected files: 1
Data scanned: 18.25 KiB
Data read: 9.18 KiB (ratio 1.99:1)
Time: 8.579 sec (0 m 8 s)
Start Date: 2026:01:23 10:23:50
End Date:   2026:01:23 10:23:59
Matched Content