TQ
dev.com

Blog about software development

Subscribe

Remove Snap Store and avoid using snaps

11 Jan 2022 - by 'Maurits van der Schee'

I was not very pleased to find that Ubuntu replaced "Software" application with "Snap Store" in the latest software updates. I don't like snaps anyway, so this was a good reason to both get rid of all installed snaps. Also I removed the snap-store (which is a snap as well) and installed the old (Gnome) Software application. In this post I explain you how to do this.

Step 1: Get rid of all installed "snaps"

First lets see what snaps are in use:

sudo snap list

Now we want to get rid of all snaps

sudo snap remove $(snap list | awk '!/^Name|^core|^snapd/ {print $1}')
sudo snap remove core && sudo snap remove snapd

This may take a while.

Step 2: Get rid of "snapd" itself

First we stop the "snapd" service:

sudo systemctl stop snapd

Now we can remove "snapd" and related packages.

sudo apt remove --purge -y snapd gnome-software-plugin-snap

To prevent "snapd" from automatically installing we can set it to "hold":

sudo apt-mark hold snapd

Now the package cannot be installed, upgraded, removed, or purged accidentally. Now run:

rm -rf ~/snap
sudo rm -rf /snap
sudo rm -rf /var/snap
sudo rm -rf /var/lib/snapd

This will remove some left-over directories.

Step 3: Get back the old Software application

Install "GNOME Software Center" using:

sudo apt install --no-install-recommends gnome-software

This will avoid installing "gnome-software-plugin-snap" and "gnome-software-plugin-flatpak" which are container plugins.

Conclusion

Not everybody likes their applications as snaps. Snaps have security implications, use a lot of disk space and are slow to start up. I feel Ubuntu is pushing snaps harder than they should. This post has helped you to avoid using snaps. Apparently some people agree with me as Linux Mint is going the same route and has this configuration (blocking snaps) by default.

Links


PS: Liked this article? Please share it on Facebook, Twitter or LinkedIn.