Manual uninstallation (Linux)

March 5, 2024

ID 180699

This section describes how to manually uninstall Kaspersky Scan Engine.

Manually uninstalling Kaspersky Scan Engine 2.1 and later

To manually uninstall Kaspersky Scan Engine 2.1 and later:

  1. Make sure you have root (administrator) privileges.
  2. Stop Kaspersky Scan Engine:
    • If you used Kaspersky Scan Engine in ICAP mode, run this command:

      service kavicapd stop

    • If you used Kaspersky Scan Engine in HTTP mode, run this command:

      service kavhttpd stop

    • If you used Kaspersky Scan Engine GUI, run this command:

      service klScanEngineUI stop

  3. Remove Kaspersky Scan Engine from the list of system services:
    • If you used Kaspersky Scan Engine in ICAP mode, run this command:

      systemctl disable kavicapd

    • If you used Kaspersky Scan Engine in HTTP mode, run this command:

      systemctl disable kavhttpd

    • If you used Kaspersky Scan Engine GUI, run this command:

      systemctl disable klScanEngineUI

  4. Delete symbolic links to Kaspersky Scan Engine configuration files:
    • If you used Kaspersky Scan Engine in ICAP mode, run this command:

      rm /etc/kavicapd.xml

    • If you used Kaspersky Scan Engine in HTTP mode, run this command:

      rm /etc/kavhttpd.xml

    • If you used Kaspersky Scan Engine GUI, run this command:

      rm /etc/klScanEngineUI.xml

  5. If you used Kaspersky Scan Engine GUI, open the PostgreSQL database, and then delete the kavebase database and the database user.

    Skip this step if you want to use the database later or if the Kaspersky Scan Engine instance you are uninstalling is part of a cluster containing other instances.

    To delete the kavebase database, run the following command:

    DROP DATABASE kavebase;

    To delete the database user, run the following command:  

    DROP ROLE %user_name%;

    where %user_name% is the name of the database user created during Kaspersky Scan Engine installation.

    For example, to delete the default scanengine database user, run the following command:  

    DROP ROLE scanengine;

    Only the superuser can delete a database and its user.

  6. Remove the /opt/kaspersky/ScanEngine directory:

    rm –rf /opt/kaspersky/ScanEngine

  7. Remove the directory that contains temporary files used by Kaspersky Scan Engine:

    rm –rf %temp_dir%

    Here %temp_dir% is the temporary directory.

Manually uninstalling Kaspersky Scan Engine 2.0

To manually uninstall Kaspersky Scan Engine 2.0:

  1. Make sure you have root (administrator) privileges.
  2. Stop Kaspersky Scan Engine:
    • If you use Kaspersky Scan Engine in ICAP mode, run this command:

      /etc/init.d/kavicapd stop

    • If you use Kaspersky Scan Engine in HTTP mode, run this command:

      /etc/init.d/kavhttpd stop

    • If you use Kaspersky Scan Engine GUI, run this command:

      /etc/init.d/klScanEngineUI stop

  3. Remove the executable file and the configuration file:
    • If you use Kaspersky Scan Engine in ICAP mode, run this command:

      rm /etc/init.d/kavicapd /etc/kavicapd.xml

    • If you use Kaspersky Scan Engine in HTTP mode, run this command:

      rm /etc/init.d/kavhttpd /etc/kavhttpd.xml

    • If you use Kaspersky Scan Engine GUI, run this command:

      rm /etc/init.d/klScanEngineUI /etc/klScanEngineUI.xml

  4. If you used Kaspersky Scan Engine GUI, open the PostgreSQL database and delete the kavebase database and the database user.

    Skip this step if you want to use the database later or if the Kaspersky Scan Engine instance you are uninstalling is part of a cluster containing other instances.

    To delete the kavebase database, run the following command:

    DROP DATABASE kavebase;

    To remove the scanengine database user, run the following command:  

    DROP ROLE scanengine;

  5. Remove the /opt/kaspersky/ScanEngine directory:

    rm –rf /opt/kaspersky/ScanEngine

  6. Remove the directory that contains temporary files used by Kaspersky Scan Engine:

    rm –rf %temp_dir%

    Here %temp_dir% is the temporary directory.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.