I'm currently running Ubuntu 20.04 LTS in a real enviroment and in a VM and I removed snap snapd
following this steps:
# stop snapd services
sudo systemctl stop snapd && sudo systemctl disable snapd
# purge snapd
sudo apt purge snapd
# remove no longer needed folders
rm -rf ~/snap
sudo rm -rf /snap /var/snap /var/lib/snapd /var/cache/snapd /usr/lib/snapd
Then, in order to avoid that other applications may reinstall it (chromium-browser
is an example of application that restores snapd
even if installed via apt
) you can create a file no-snap.pref
by issuing:
sudo -H gedit /etc/apt/preferences.d/no-snap.pref
and then copying the following content in it:
# To install snapd, specify its version with 'apt install snapd=VERSION'
# where VERSION is the version of the snapd package you want to install.
Package: snapd
Pin: release a=*
Pin-Priority: -10
The file above prevents you from installing snapd
if you type sudo apt install snapd
, but allows you to install it if you run sudo apt install snapd=2.45.1+20.04.2
(the version in the command is just an example).
Original answer (2020/06/19):
I'm currently running Ubuntu 20.04 in a real enviroment and in a VM and I removed snap following this article: https://www.kevin-custer.com/blog/disabling-snaps-in-ubuntu-20-04/
I've never had any kind of issue following these steps.
Note that if you receive some errors while removing some snap package, try to remove another one and then come back to the one that gave you troubles: snap packages may have some dependencies, and you cannot remove one before before another one.
Moreover, before the command sudo umount /snap/core/xxxx
run sudo systemctl stop snapd