How to completely remove snap

I agree with you on this. There is too much fragmentation in the Linux ecosystem, too many wasted resources.

2 Likes

Completely agree. I don't understand why all of these new ways to install things when they don't seem to be improvements. I personally love Apt. It works good and has for years.

3 Likes

Adding my "me-too" to this, as well.

I'm glad that snapd seems to be completely removable now, before it had a dependency on "ubuntu-core" or somesuch, and the best you could do was just remove all of the snaps.

It's not the size of snaps that bothers me, nor the library duplication... I'm just really, really irked by how it spams up my mounts with loopback devices.

4 Likes

Me too.

I uninstalled snap but I still have all those loopback mount points I can't seem to get rid of.

How can I remove all this please without trashing my system?

spock@aspire-laptop ~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           389M  6.3M  382M   2% /run

/dev/loop0       28M   28M     0 100% /snap/snapd/6953
/dev/loop1       49M   49M     0 100% /snap/gtk-common-themes/1474
/dev/loop4       55M   55M     0 100% /snap/core18/1705
/dev/loop2       55M   55M     0 100% /snap/core18/1668
/dev/loop3       45M   45M     0 100% /snap/gtk-common-themes/1440
/dev/loop5      161M  161M     0 100% /snap/gnome-3-28-1804/116
/dev/loop6       25M   25M     0 100% /snap/snapd/6434

cgmfs           100K     0  100K   0% /run/cgmanager/fs
tmpfs           389M   60K  389M   1% /run/user/1000
1 Like

The /dev/loop things went away for me after a reboot.

Nowt wrong with constructive criticism, (big, heavy, slow).
Its useful to know whats chewing resources, cheap it maybe, but its not free.

If you check the comments on this article I think the feelings expressed are commonly held at the moment.

Various parts of Snap go against the Linux Tao. App specific folders full of libs and preventing access to system folders is very Windowsy.

3 Likes

Blocking completly Snap/s in APT/Synaptic Package Manager:

ToDo:

Create a file like "anti-snap / snap-blocker or what ever you file-name is" and place it in "/etc/apt/preferences.d"

Open the file "anti-snap / snap-blocker or what ever you file-name is" in it and add these lines:

Package: core18
Pin: release *
Pin-Priority: -1

Package: golang-github-snapcore-snapd-dev
Pin: release *
Pin-Priority: -1

Package: gnome-software-plugin-snap
Pin: release *
Pin-Priority: -1

Package: gtk-common-themes
Pin: release *
Pin-Priority: -1

Package: libsnapd-glib-dev
Pin: release *
Pin-Priority: -1

Package: libsnapd-qt-dev
Pin: release *
Pin-Priority: -1

Package: libsnapd-qt1
Pin: release *
Pin-Priority: -1

Package: qml-module-snapd
Pin: release *
Pin-Priority: -1

Package: snapd
Pin: release *
Pin-Priority: -1

Package: snapd-glib-tests
Pin: release *
Pin-Priority: -1

Package: snapd-xdg-open
Pin: release *
Pin-Priority: -1

Package: snap-store
Pin: release *
Pin-Priority: -1

Package: ubuntu-core-snapd-units
Pin: release *
Pin-Priority: -1

'save' the file.

Then in Mate-(Terminal) run "sudo apt-get update" (packages above should now be blocked)

Open Synaptic Package Manager and verify under Installed Version/Description
Under Installed Version/Description it must be blank, no details.

This should be enough to block Snap when updates/upgrades are made to the system.

To revert back, delete the file "anti-snap / snap-blocker or what ever you file-name is"

If I forgot to post another package to Snap, just add it to "snap-blocker / ..." file.

Thanks for the good article. Just trying to clean up my system a little to see what difference it makes.
I'm not dogmatic one way or another. Just wanted to remove any snap stuff to see what effect it had.
May reinstall stuff later or not
Thanks

snapd is using 80% of my processor all the time so I want out!

When I try to run sudo snap remove <package> I get an error "change in progress"
I try to kill the snapd process but it restarts.

What can I do to get rid of this useless stuff?

1 Like

I found these comands
To permanently disable snap packages:

sudo systemctl stop snapd.service
sudo systemctl disable snapd.service

Hasn't started up again since & everything is much faster!

I have a cloud server with only 1 core and 1GB RAM and running snap on that machine is just terribly bad. Snap always take 100% of my CPU and memory, all of my web services get blocked. Thanks to this article, I can get rid of it.
The developer should take care of users with low CPU and memory. Nowadays, there are still many cloud instances that only have 1 core/1GB RAM.

Thank you very much for your help, to remove this absolutely unnecessary staff from my lovely Debian.

1 Like

I think it is enough to block just snapd, since everything else relies on it. Linux mint blocks it like that. It has the file "/etc/apt/preferences.d/nosnap.pref", which contains:

# To prevent repository packages from triggering the installation of Snap,
# this file forbids snapd from being installed by APT.
 
Package: snapd
Pin: release a=*
Pin-Priority: -10

So after you remove all snap related stuff, just uses that file.

I personally like snap/flatpacks/appimages for the exceptions. So it serves that purpose. But the fact that ubuntu defaults to it, and even installs a snap when you don't specifically ask for it, kinda puts me off. and not without reason. sometimes a snap/flatpack uses 1GB, while the normal package will cost you 10 mb. This is costly if have you have 10 of those packages installed, especially on an SSD.

1 Like

How to slove the problem that it stuck when I typed and run sudo snap remove snap?

snap make my raspberry pi slow, and start-up slow. And it was hard to uninstall...

I don't use snap in my raspberrypi. so uninstall it is good choose.

Thanks for this fellows.

My SHOCK when I saw the difference in system reource usage, before and after complete removal of this abomination on main Ubuntu! Holy heaven! There is a LOT if fixing for them to do about this Snap.

Before: RAM used 2,3 GB and 4-5 GB cached, SWAP active on 2%, CPU regular spikes
After: CPU and fans down to ground zero, RAM usage: 1,1 GB, with merely 620 MB in cache, no SWAP activity.

And they call this great solution? To what?

2 Likes

Thank you!!! Worked like a champ. I was getting frustrated! Snap kept making mounts after I did a apt-get remove snap!!!

I don't know if this is criticism but any package that I install on my VM and then I can't simply remove is a huge red flag to me. I removed snap and it kept mounting on my VM I am with @Med_Medin on this. I distrust Snap products simply because my VM performance was impaired and then I had to find someone to rip it out of my VM. Thank goodness for @franksmcb

3 Likes

I put off letting this install somehow it snuck in. Thank whoever for this tumour removal thread. I could not be happier as my monitoring scripts started pushing erroneous data due to the loop mounts... finding this thread on snap loop mounts initial thought was my system is compromised.. I know us old timers can be resistant to change and some say it is a good thing to change... having been on Unix desktops since 1990 some things just work. Sometimes new is not better it is just less secure, poorly built, and bloated.
This is one of those pick three scenarios.
Having read what it is supposed to do it looks nifty, but not nifty enough to make me tolerate piles of loop mounts which affect maintenance scripts or rewriting my code to support a new feature which I do not use.

2 Likes

You can enter this command to use dd to erase the extra disks created by Snap:

dd if=/dev/zero of=/dev/loop