User Tools

Site Tools


en:tipps:remove_snap

Linux: remove snap completely

snap is yet another system for installing software on Linux computers.

Whether you need it or not, at the moment (2021) the snap store is under the sole control of Canonical (Ubuntu) and the source code is proprietary, so nobody can check what the snap store actually delivers and installs.

For me this is a security risk, which is why I completely remove snap as one of the first steps in every Linux installation. Unfortunately, this is not that easy because snap nests in the system like an octopus.

This example was done with the Odroid C4 running Ubuntu Mate (as delivered by Hardkernel).

This process must be strictly adhered to:

all work in a terminal:

  • List snap packages: snap list , the output can look like this
odroid @ odroid: ~ $ snap list
Name Version Rev Tracking Publisher Notes
certbot 1.12.0 953 latest / stable certbot-eff โœ“ classic
core 16-2.48.2.1 10828 latest / stable canonical โœ“ core
core20 20201210 907 latest / stable canonical โœ“ base
  • Remove the individual packages: sudo snap remove certbot and all others. When removing core there will be an error message because the snap core attaches itself to the file system with different mount points, which must first be removed.
  • To do this, shows the mounts: df -h | grep snap
/dev/loop1 88M 88M 0 100% / snap / core / 10828
/dev/loop4 87M 87M 0 100% / snap / core / 10585
  • to unmount these mounts enter:
sudo systemctl stop snapd
sudo unmount /dev/loop1 (and all others too)
sudo systemctl start snapd

now snap core can be removed: sudo snap remove core
to check: snap list must not display anything anymore.

Snap is now empty and unused, but is still in the system. Now it can be removed:

sudo apt-get remove snapd

Done, my Ubuntu on the Odroid is free of software I don't want and I feel safer again.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
en/tipps/remove_snap.txt ยท Last modified: 2021/03/14 15:24 by kurt