How to disable and remove completely Snaps in Ubuntu Linux

Canonical sometimes listens to its user base, while other times simply it goes straight on its way. This has happened for the graphic environment of Unity (regret by many!) and the same is happening for several technological implementations in the latest revisions of the Ubuntu Linux operating system.

Snap is a magnificent idea with a still immature realization. It is a fact that the performance worsens with snaps, so why force the hand by forcing users to use this technology. The packages called snaps, and the tool for using them, snapd, work across a range of Linux distributions allowing distribution-agnostic upstream software packaging. Snap application packages of software are self-contained and work across a range of Linux distributions and this is gorgeous, but performance is a no-go.

Obviously the main reason to remove the snap system is the unsightly snap folder in our home folder. What an ugly thing! We only joke because it would be enough to hide it by editing a .hidden file in the home folder and inserting the name of the snap folder in it. Anyway, it’s an addition.

In addition to the performance discourse, the Snap are still immature from different points of view for use in the production environment or in workplaces where time spent equals money spent. Even simple operations such as accessing the folder with your work files (be they audio, documents, photos, or videos), can become complicated, difficult, or a waste of time. In short, why ever use snaps if we can do without them?

How to disable snaps in Ubuntu and live happily

We had already published a complete guide (A better Ubuntu Linux without the crappy Snap) to removing the Snap subsystem from an Ubuntu Linux system, here we try to update it to support all the latest versions released.

We had many issues with Snap to write a book, from the conflicts with drivers to the incredibly slow applications starting time to many other fables.

The snap experience is bad, and is increasingly required for Ubuntu

The overall user experience with Snaps on Ubuntu is frustrating: several apps won’t start when installed as snaps, others run weird, others take really long time to start. As an example: Telegram as snap takes around 51 sec to be operative, Telegram installed as binary starts in 1,5 sec.

Starting from Ubuntu 20.04, the problem with the Snap has become even greater because, by default, the new version of the Canonical operating system includes several Snap packages that replace the previous binaries and the installation of the new software gives the priority to the Snap system.

So, let see how to purge the Snap system from the Ubuntu operating system.

In a terminal session (or window), you can play with these commands:

$ snap list # to list all the existing snap packages

$ sudo snap remove <name-of-the-package> # to remove the snap package

$ sudo snap remove snap-store # as example, to remove the snap-store package

Note: you can’t remove the ‘core’ snap package with sudo snap remove core, but we’ll do it later. Also kudos to Kevin Custer for the next step on snap core unmount!

$ sudo umount /snap/snapd/XXXX # to unmount the snap core service

Note: replace the XXXX with the ID number inside the core directory on your system. You can find it by running the df command and getting something like /dev/loop4 27776 27776 0 100% /snap/snapd/7264.

$ sudo apt purge snapd # to remove and purge the snapd package and all of its related services

$ sudo rm -rf ~/snap /snap /var/snap /var/lib/snapd # to remove all the folder related to snap, if existing

And that’s all, so enjoy again your brand new Snap-Free-Ubuntu!

Alternatively, you can also use Ubuntu derivative distributions that have removed the Snap system, such as Linux Mint or Pop!_OS.

References and resources

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *