Almost always, the recommended and sufficient way to completely uninstall an Acronis Cyber Backup Cloud Agent for Linux is to follow Acronis Cyber Protect Cloud: manual uninstallation and execute (as root):
However, in very rare circumstances (e.g. power loss, system crash, interruption by the user, or when old versions of the agent have been used at some point on the machine), some leftovers may remain; in even rarer circumstances, it is possible that (re-) installing the same, or newer, or older version of the agent might encounter errors and refuse to install.
Example: There are Acronis products or components that are incompatible with the one that you are going to install. Please uninstall them and restart the installation.
In such cases, it may become necessary to attempt a fully manual cleanup.
(!) Before you begin, make sure that terminal client/SSH client is configured to buffer all or enough of the possibly many pages of text the following commands can produce. Be sure to capture the whole CLI session to a text file on your PC, and be ready to provide the full history for investigation by Acronis support, if required.
In the rare case that some leftovers are present after using the normal agent uninstaller, do the following to manually uninstall Agent and remove its components.
1. First, stop all running Acronis services which are part of the agent.
Run one of the following commands to show the list of the services belonging to the Agent:
systemctl | grep -i acronis
systemctl | grep -i acro
Similarly, run the command below to show processes related to Acronis Agent:
ps aux | grep -i acro
Stop each service using the following command:
sudo systemctl stop <servicename>
2. Ensure that any backups which might have been mounted via the trueimagemnt or acrocmd command-line tools (either by the agent when it was in use previously, or by the user manually, or by some 3rd party script or integration tool/plugin) have been unmounted, and that no backup remains mounted on through the "snumbd" kernel driver module.
You can check for mounted backups by using these commands:
mount | grep -i snumbd
cat /proc/partitions | grep snumbd
sblk -m | grep snum
The goal is to have no active mounts (no output) by trueimagemnt --list, and similarly for other commands.
Example of trueimagemnt --list showing no mounts:
[root@host ~]# trueimagemnt --list
Here are some examples of when there IS something mounted on snumbd:
# lsblk -m | grep snum
The sizes (in Megabytes and Terabytes, in the 2nd column) are the sizes of the mounted partitions from backups.
[root@host~]# cat /proc/partitions
major minor #blocks name
8 16 1000204632 sdb
8 17 4202496 sdb1
8 18 525312 sdb2
8 19 995475456 sdb3
8 48 1000204632 sdd
8 49 4202496 sdd1
8 50 525312 sdd2
8 51 995475456 sdd3
8 32 1000204632 sdc
8 33 4202496 sdc1
8 34 525312 sdc2
8 35 995475456 sdc3
8 0 1000204632 sda
8 1 4202496 sda1
8 2 525312 sda2
8 3 995475456 sda3
9 127 1990686720 md127
9 126 8394752 md126
9 125 1046528 md125
7 0 4194304 loop0
252 1 1046528 snumbd1d
252 3 1990686720 snumbd3d
252 4 1046528 snumbd4d
252 6 1990686720 snumbd6d
Similarly, here the "number of blocks" command shows non-zero value for the snumbdXX devices, and that they exist -- so clearly there are still mounted backups, from the point of view of snumbd and the kernel.
3. Then manually delete the directories where the Agent's components reside, and force-uninstall the RPM packages from the system:
rm -rf /usr/lib/Acronis/ /var/lib/Acronis/ /etc/Acronis
rpm -qa | grep snapapi26_modules | xargs rpm -e --nodeps
rpm -qa | grep file_protector | xargs rpm -e --nodeps
rpm -qa | grep BackupAndRecoveryBootableComponents | xargs rpm -e --nodeps
rpm -qa | grep BackupAndRecoveryAgent | xargs rpm -e --nodeps
Note: If some backup remains mounted on the "snumbd" block device(s), the "rpm -e ..."/"dkms remove ..." commands and pre-uninstall scripts will generally NOT be able to unload the "snumbd" kernel module (due to the "snumbd" block devices being in use/locked, from the perspective of the Linux kernel). Naturally, if something is mounted, it is best to first try to unmount it.