How to update ClamAV definitions database?

Solution 1:

To update the ClamAV database do sudo freshclam.

NAME
       freshclam - update virus databases

SYNOPSIS
       freshclam [options]

DESCRIPTION
       freshclam is a virus database update tool for ClamAV.

For offline update, you can also directly download virus definition from database: main, daily and then put them into /var/lib/clamav (remove old files).

Solution 2:

Run sudo apt-get install clamav.

Once ClamAv is installed you can set up a script for right click virus scanning in Nautilus.

To update the virus database, open a terminal and enter the following command:

sudo freshclam

To automate this update you can set up a cron job. I'll show how to update the virus database every day at 8:57 AM. First, open the terminal and su to root.

sudo su

Now you need to modify the crontab for the root user.

crontab -e

This opens the root crontab file in the nano text editor. Add the following line

57 08 * * * freshclam

to the crontab and then hit Ctrl+X to exit. Answer yes when prompted to save the file.

Solution 3:

The right way to go is to edit freshclam.conf and add the number of dayly Checks you want

vim /etc/clamav/freshclam.conf
Checks 24
##Notify clamd to reload it self
NotifyClamd /etc/clamav/clamd.conf