Uninstall anbox on ubuntu 20.04

After unsuccessfully trying to make anbox work on ubuntu 20.04, I tried to purge it and start from scratch, but after executing sudo snap remove anbox anbox seems to be still installed and doing find / -iname \*anbox\* gives me a long list of files containing anbox.


./usr/lib/systemd/system/anbox-container-manager.service
./usr/lib/systemd/user/anbox-session-manager.service
./usr/share/applications/anbox.desktop
./usr/share/doc/anbox
./usr/share/anbox
./usr/share/anbox/anbox-shell.sh
./usr/share/anbox/anbox-bridge.sh
./usr/share/man/man1/anbox.1.gz
./usr/share/pixmaps/anbox.png
./usr/bin/anbox
./home/myuser/.config/systemd/user/default.target.wants/anbox-session-manager.service
./home/myuser/build/anbox-system-diagnostics-2021-06-26.zip
./home/myuser/build/anbox-modules
./home/myuser/build/anbox-modules/99-anbox.rules
./home/myuser/build/anbox-modules/anbox.conf
./home/myuser/snap/anbox-installer
./sys/kernel/slab/radix_tree_node/cgroup/radix_tree_node(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/radix_tree_node/cgroup/radix_tree_node(1732:anbox-session-manager.service)
./sys/kernel/slab/dentry/cgroup/dentry(1732:anbox-session-manager.service)
./sys/kernel/slab/dentry/cgroup/dentry(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/dentry/cgroup/dentry(362:snap-anbox-213.mount)
./sys/kernel/slab/dentry/cgroup/dentry(3099:anbox-session-manager.service)
./sys/kernel/slab/proc_inode_cache/cgroup/proc_inode_cache(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/kmalloc-rcl-64/cgroup/kmalloc-rcl-64(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/:a-0000104/cgroup/buffer_head(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/kmalloc-4k/cgroup/kmalloc-4k(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/kmalloc-2k/cgroup/kmalloc-2k(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/inode_cache/cgroup/inode_cache(362:snap-anbox-213.mount)
./sys/kernel/slab/inode_cache/cgroup/inode_cache(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/shmem_inode_cache/cgroup/shmem_inode_cache(3099:anbox-session-manager.service)
./sys/kernel/slab/shmem_inode_cache/cgroup/shmem_inode_cache(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/shmem_inode_cache/cgroup/shmem_inode_cache(1732:anbox-session-manager.service)
./sys/kernel/slab/squashfs_inode_cache/cgroup/squashfs_inode_cache(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/ext4_inode_cache/cgroup/ext4_inode_cache(1529:snap.anbox.container-manager.service)
./sys/kernel/slab/ext4_inode_cache/cgroup/ext4_inode_cache(1732:anbox-session-manager.service)
./sys/fs/cgroup/freezer/snap.anbox
./root/snap/anbox
./tmp/snap.anbox
./run/snapd/lock/anbox.lock
./run/user/1001/anbox
./run/user/1000/anbox
./etc/apt/sources.list.d/morphis-ubuntu-anbox-support-focal.list
./etc/apt/trusted.gpg.d/morphis_ubuntu_anbox-support.gpg
./etc/systemd/system/multi-user.target.wants/anbox-container-manager.service
./etc/systemd/user/default.target.wants/anbox-session-manager.service
./var/lib/dpkg/info/anbox.md5sums
./var/lib/dpkg/info/anbox.postinst
./var/lib/dpkg/info/anbox.postrm
./var/lib/dpkg/info/anbox.prerm
./var/lib/dpkg/info/anbox.list
./var/lib/dkms/anbox-binder
./var/lib/dkms/anbox-ashmem
./var/lib/anbox
./var/lib/snapd/sequence/anbox-installer.json
./var/lib/snapd/sequence/anbox.json
./var/lib/snapd/snapshots/6_anbox_4+gitrad377ff_213.zip
./var/lib/snapd/snapshots/3_anbox_4+gitrad377ff_213.zip
./var/lib/snapd/snapshots/1_anbox_4-56c25f1_186.zip
./var/lib/snapd/snapshots/5_anbox-installer_1_24.zip
./var/lib/snapd/snapshots/2_anbox_4+gitrad377ff_213.zip
./var/lib/snapd/snapshots/4_anbox_4+gitrad377ff_213.zip
./var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/anbox-container-manager.service
./var/lib/systemd/deb-systemd-helper-enabled/anbox-container-manager.service.dsh-also
./var/lib/systemd/deb-systemd-user-helper-enabled/anbox-session-manager.service.dsh-also
./var/lib/systemd/deb-systemd-user-helper-enabled/default.target.wants/anbox-session-manager.service
./var/cache/apt/archives/anbox_0.0~git20191115-1build1_amd64.deb

Trying sudo snap remove anbox again tells me that anbox is not installed. So what did I do wrong and how can I fix it?


Solution 1:

Once the snap is removed, you have to remove the installed kernel modules as well with the following commands:

sudo apt install ppa-purge
sudo ppa-purge ppa:morphis/anbox-support

Once done, Anbox is removed from your system.

Solution 2:

If you install anbox using 'apt' command, Try to use this command: "sudo apt remove anbox"