Kaspersky Secure Mail Gateway

Removing the application

July 3, 2024

ID 58341

The node with the application being removed must first be removed from the cluster.

You can remove the KSMG application completely or partially.

Complete removal

When the application is completely removed from the server, all files and directories are deleted. System users and groups are not deleted.

To completely remove the application:

  1. Run the following commands:
    • If the application was installed from a DEB package:

      dpkg -r ksmg-l10n-cs

      dpkg -r ksmg-l10n-de

      dpkg -r ksmg-l10n-es

      dpkg -r ksmg-l10n-fr

      dpkg -r ksmg-l10n-ja

      dpkg -r ksmg-l10n-pt-BR

      dpkg -r ksmg-l10n-ru

      dpkg -r ksmg-l10n-zh-CN

      dpkg -r ksmg-l10n-zh-TW

      dpkg -r ksmg

    • If the application was installed from an RPM package:

      rpm -e ksmg_cs

      rpm -e ksmg_de

      rpm -e ksmg_es

      rpm -e ksmg_fr

      rpm -e ksmg_ja

      rpm -e ksmg_pt-BR

      rpm -e ksmg_ru

      rpm -e ksmg_zh-CN

      rpm -e ksmg_zh-TW

      rpm -e ksmg

  2. Run the following script to delete application data:

    /var/opt/kaspersky/ksmg/cleanup.sh

  3. Enter yes to confirm deletion of data remaining after the removal of KSMG.
  4. If the application was installed from a DEB package, after the script finishes, run the following command:

    dpkg -P ksmg

    If the application was installed from an RPM package, no further steps are necessary.

Application data are deleted from the server.

Partial removal

In case of partial removal, data created and used by the application remain on the server, as are system users and groups.

Partial removal of KSMG can be useful if you may need to reinstall KSMG in the future. In this case, KSMG will detect and restore the following data during setup:

  • Message processing rules
  • Application settings
  • Backup contents
  • Quarantine contents
  • Event logs

To partially remove the application installed from a DEB package, run the following commands:

dpkg -r ksmg-l10n-cs

dpkg -r ksmg-l10n-de

dpkg -r ksmg-l10n-es

dpkg -r ksmg-l10n-fr

dpkg -r ksmg-l10n-ja

dpkg -r ksmg-l10n-pt-BR

dpkg -r ksmg-l10n-ru

dpkg -r ksmg-l10n-zh-CN

dpkg -r ksmg-l10n-zh-TW

dpkg -r ksmg

To partially remove the application installed from an RPM package, run the following commands:

rpm -e ksmg_cs

rpm -e ksmg_de

rpm -e ksmg_es

rpm -e ksmg_fr

rpm -e ksmg_ja

rpm -e ksmg_pt-BR

rpm -e ksmg_ru

rpm -e ksmg_zh-CN

rpm -e ksmg_zh-TW

rpm -e ksmg

If necessary, you can later remove all files and directories remaining after the removal of the application. The script is provided as part of the KSMG installation package.

Deleting application data using the script

After the partial removal of KSMG, the following data remain on the computer: the application settings database, messages in Backup, executable service files, database updates, created reports, application log files, and sockets that the application creates and uses.

To delete the data that remains after the partial removal of an application:

  1. Run the following command:

    /var/opt/kaspersky/ksmg/cleanup.sh

  2. Enter yes to confirm deletion of data remaining after the removal of KSMG.
  3. If the application was installed from a DEB package, after the script finishes, run the following command:

    dpkg -P ksmg

    If the application was installed from an RPM package, no further steps are necessary.

Application data are deleted from the server.

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.