Uninstall clamav

How can we uninstall clamav with the latest custombuild versions?
That might not be possible if you updated Directadmin to one of the latest versions lately.
Because Custombuild changed clamav to use the OS version of clamav.

If that is the case (you an update DA version) then you might need to uninstall it like this:
Code:
cd /usr/local/directadmin/custombuild
./build set clamav no
./build set clamav_exim no
./build set proftpd_uploadscan no
./build set pureftpd_uploadscan no
./build set suhosin_php_uploadscan no
./build set modsecurity_uploadscan no
yum remove clamav* -y
yum remove clamd -y

Last commands are for if you're on Centos or Almalinux. For Debian/Ubuntu you would need apt to uninstall.
 
For who may have this issue in the future,
you need to remove clamd from /usr/local/directadmin/data/admin/services.status to stop getting annoying service not running errors afterwards.
 
That might not be possible if you updated Directadmin to one of the latest versions lately.
Because Custombuild changed clamav to use the OS version of clamav.

If that is the case (you an update DA version) then you might need to uninstall it like this:
Code:
cd /usr/local/directadmin/custombuild
./build set clamav no
./build set clamav_exim no
./build set proftpd_uploadscan no
./build set pureftpd_uploadscan no
./build set suhosin_php_uploadscan no
./build set modsecurity_uploadscan no
yum remove clamav* -y
yum remove clamd -y

Last commands are for if you're on Centos or Almalinux. For Debian/Ubuntu you would need apt to uninstall.
can you point me to the documentation about this?
 
can you point me to the documentation about this?
Documentation about what exactly?

For the removal from custombuild you can check the latest 4 or 5 changelogs.
For installing clamav, check here:

same for uninstalling, a little bit lower on that page.

If that is not what you're looking for please specify what you mean.
 
Looks like this is caused by removal conditions not being met to run doRemoveClamav function, at least that seems to be the case for my DA install on Rocky Linux 9.

OS: Rocky Linux 9
DA Version: 1.647

Lines 16795 to 19797 in build:

Code:
if [ -e /usr/local/sbin/clamd ] || [ -e /usr/local/lib64/libfreshclam.so.2 ]; then
    doRemoveClamav
fi

And on the server:

Code:
[root@server sbin]# stat /usr/local/sbin/clamd
stat: cannot statx '/usr/local/sbin/clamd': No such file or directory

[root@server sbin]# stat /usr/local/lib64/libfreshclam.so.2
stat: cannot statx '/usr/local/lib64/libfreshclam.so.2': No such file or directory

[root@server sbin]# which clamd
/sbin/clamd

Maybe one for the developers to look at although they do state in the articles that ClamAV lacks support.

As I am not interested in exim scanning etc I decided to remove it using instructions above and install just the packages away from DA.

A simple bash script to scan weekly and email me the report does the job for me.

I will probably remove it when ImmunifyAV is supported on RHEL9 with DA.
 
Back
Top