How to stop clamd

Hi all,

A real newbee question !

On reboot, clamd runs for about 2-3 minutes and takes a lot pf CPU time.

I am on a LOCAL VM testing Jitsi and I have to reboot often.

How can I disable clamd until I finish debugging Jitsi ?

Thank you,


Do not recall if the service is listed and manageable from the Services section on the server-manger. From command line I guess it is:

systemctl stop clamd
systemctl disable clamd

Hi @dnutan,

Thank you for your reply.

# systemctl stop  clamd
Failed to stop clamd.service: Unit clamd.service not loaded.

At last, I found something:

# systemctl disable --now clamd@amavisd

# yum remove clamav clamav-lib
Résumé de la transaction
Supprimer  2 Paquets (+7 Paquets en dépendance)

Taille d'installation : 12 M
Supprimé :
  clamav.x86_64 0:0.103.2-1.el7              clamav-lib.x86_64 0:0.103.2-1.el7

Dépendances supprimées :
  clamav-unofficial-sigs.noarch 0:7.2.4-1.el7
  clamav-update.x86_64 0:0.103.2-1.el7
  clamd.x86_64 0:0.103.2-1.el7
  nethserver-antivirus.noarch 0:1.5.1-1.ns7
  nethserver-clamscan.noarch 0:1.0.3-1.ns7.sdl
  nethserver-mail-filter.noarch 0:2.30.0-1.ns7
  nethserver-mail-quarantine.noarch 0:2.30.0-1.ns7

Terminé !

# reboot

No more clamd and now booting is much faster.

To re-install, just install back clamav and clamav-lib.


1 Like

Hi @michelandre,
Please use the following variant to mark a topic as solved:

clamd is used by nethserver-mail-filter, nethserver-clamscan, nethserver-squid … , when you update the database it takes a long time

1 Like

Salut Stéphane,

Thank you for the clarification that it was the update that was the trouble and not a scan.

Instead of restoring the previous snapshot (for which clamd was not up to date), I should have let it go for the update, take a new snapshot, boot the new snapshot and it would not have updated again.


1 Like

Bonjour michel-andré

Indeed, it is a pity, nightmare when I test something on my VM with nethserver-mail-filter, at boot time the VM is so slow, until I kill clamd

Something to know :smiley:

1 Like

Salut Stéphane.

Even with a new snapshot, clamd wants to update… :worried:


what version of clamd is runing : for rspamd, squid ???

# rpm -qa | grep rspamd

# rpm -qa | grep squid

# rpm -qa | grep  nethserver-squid

# rpm -qa | grep spamd

Thank you for your support.


systemctl disable clamd@rspamd.service
systemctl stop clamd@rspamd.service

# systemctl disable clamd@rspamd.service

# systemctl stop clamd@rspamd.service

After a reboot: from 25% to 78% CPU for clamd.

But if I do those commands right after the reboot, then clamd is no more in the picture.

So, your solution is working.

I’ll do like my teacher used to at my primary school: stick a little angel and a star beside you name on my list of “The Greatest”. :wink:


1 Like