freshclam(1)
β¨ freshclam β the Clam AntiVirus manual page, bestie edition β¨
okay so. you found the freshclam page in section 1 of the Clam AntiVirus manual and I am SO glad you're here. sit down, hydrate, let's get into it π
πΈ NAME πΈ
freshclam β update virus databases. that's it. that's the whole job. she keeps your virus database fresh, hence the name, iykyk π¦
π SYNOPSIS π
freshclam [options]
π DESCRIPTION π
freshclam is a virus database update tool for ClamAV. she goes out there, grabs the newest database files, and keeps your setup from being stale. lowkey the most important relationship in your whole antivirus life fr fr π
β¨ OPTIONS β¨
so FreshClam reads its settings from freshclam.conf first, and then you can overwrite any of those settings with command line options. command line wins, always, no cap. here's every single one, and yes I mean every single one, don't skip:
-h,--helpβ prints the help info and dips. π-V,--versionβ prints the version number and exits. short and sweet.-v,--verboseβ be verbose, bestie. this one makesfreshclamprint a lot more info than usual. main character energy, she's telling you everything π£οΈ--debugβ turns on debug messages from LibClamAV. deep lore mode.--quietβ be quiet. only error messages get through. shhh π--no-warningsβ don't print warnings and don't log them either. not today, negativity.--stdoutβ writes all messages to stdout.--show-progressβ shows the download progress percentage. we love a progress bar π―--config-file=FILEβ read configuration from FILE.-l FILE,--log=FILEβ log the report to FILE.-d,--daemonβ run in daemon mode. defaults to 12 checks per day unless you say otherwise with--checksor infreshclam.conf. she's living in the background now, iconic.-p FILE,--pid=FILEβ writes the daemon's pid to FILE.-F,--foregroundβ don't fork into the background. this one's for use in daemon mode.-u USER,--user USERβ run as USER. by default (when it's started by root)freshclamdrops privileges and operates as theclamavuser. she knows her place in the permission hierarchy π--no-dnsβ this option forces the old non-DNS verification method (without a TTL delay).-c #n,--checks=#nβ check #n times per day for a new database.#nmust be between 1 and 50.--datadir=DIRECTORYβ install the new database in DIRECTORY. the directory must be writable for theclamavuser or the unprivileged user runningfreshclam, it must already exist, and it must be an absolute path. read that again, she's picky about all three.--daemon-notify=/path/to/clamd.confβ notify the daemon about the new database. by default it reads a hardcoded config file, but you can use a different one. both local and TCP sockets are supported.-a IP,--local-address=IPβ use this (local) IP for HTTP downloads. useful for multi-homed systems. if the binding fails for whatever reason, a warning is issued andfreshclambehaves like without this flag.--on-update-execute=COMMANDβ execute COMMAND after a successful update.--on-error-execute=COMMANDβ execute COMMAND if an error occurred. and remember, virus database freshness is the most important thing in an anti-virus system. with this optionfreshclamcan alert you (eg. send SMS) when something is going wrong. π¨--on-outdated-execute=COMMANDβ execute COMMAND whenfreshclamreports an outdated version. in the command string%vwill be replaced by the new version number.--update-db=DBNAMEβ with this option you can limit updates to a subset of database files. DBNAME should be"main","daily","bytecode","safebrowsing"or one of the 3rd party database names. this option can be used multiple times and only works with the official and 3rd party databases distributed through the ClamAV mirrors β your custom databases (specified withDatabaseCustomURLinfreshclam.conf) will not be ignored.
π ENVIRONMENT VARIABLES π
freshclam uses these environment variables, bestie, take notes:
CURL_CA_BUNDLEβ (Linux/Unix only, excluding macOS) may be set to the path of a file (bundle) containing one or more CA certificates. this will override the default openssl certificate path.FRESHCLAM_CLIENT_CERTβ may be set to the path of a file (PEM) containing the client certificate. this may be used for client authentication.FRESHCLAM_CLIENT_KEYβ may be set to the path of a file (PEM) containing the client private key. this is required ifFRESHCLAM_CLIENT_CERTis set.FRESHCLAM_CLIENT_KEY_PASSWDβ may be set to a password for the client key PEM file. this is required ifFRESHCLAM_CLIENT_KEYis set and the PEM file is password protected.CVD_CERTS_DIRβ specify a directory containing the root CA cert needed to verify detached CVD digital signatures. if not provided, thenfreshclamwill look in the default directory.
π‘ fun lil fact: theCURL_CA_BUNDLEenvironment variable is also used by thecurlcommand line tool for the same purpose. sharing is caring π«Ά
π¦ EXAMPLES π¦
(0) download database to the default directory:
freshclam
(1) download database to the current directory:
freshclam --datadir=.
(2) run as a daemon and check 2 times per day for a new database:
freshclam -d -c 2
π RETURN CODES π
some return codes of freshclam can be overwritten with a built-in command EXIT_n which can be passed to --on-*-execute, eg. --on-update-execute=EXIT_1 will force freshclam to always return 1 after a successful database update. (yes, that means you can override the exit codes. use that power responsibly, ok?)
0: Database is up-to-date or successfully updated. π40: Unknown option passed.50: Can't change directory.51: Can't check MD5 sum.52: Connection (network) problem.53: Can't unlink file.54: MD5 or digital signature verification error.55: Error reading file.56: Config file error.57: Can't create new file.58: Can't read database from remote server.59: Mirrors are not fully synchronized (try again later).60: Can't get information about'clamav'user from/etc/passwd.61: Can't drop privileges.62: Can't initialize logger.
π FILES π
/etc/clamav/freshclam.conf
β CREDITS β
please check the full documentation for credits. π
π AUTHOR π
Tomasz Kojm <tkojm@clamav.net>, Kevin Lin <klin@sourcefire.com>
π₯ SEE ALSO π₯
freshclam.conf(5), clamd(8), clamd.conf(5), clamscan(1)
aaaand that's the whole thing bestie, you ate it. this page is from ClamAV 1.5.4, dated December 4, 2013 β like, that's the version and date, no cap. go update your virus database, she's waiting π β¨π¦
π¦ where this page comes from
- arch rolling: clamav 1.5.4-1 Β· GPL-2.0-only
- nixpkgs unstable: clamav 1.5.4
- ubuntu jammy: clamav-freshclam 1.5.4+dfsg-0ubuntu0.22.04.1 Β· GPL-2.0-only
- ubuntu noble: clamav-freshclam 1.5.4+dfsg-0ubuntu0.24.04.1 Β· GPL-2.0-only
- ubuntu resolute: clamav-freshclam 1.5.4+dfsg-0ubuntu0.26.04.1 Β· GPL-2.0-only
- ubuntu stonking: clamav-freshclam 1.5.4+dfsg-0ubuntu1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms