How to completely remove snap

I installed Ubuntu Mate 18.04.2, and I want to know how to remove all installed snaps from my machine and finally remove completely snap.

1 Like

Find installed snaps: snap list

Remove installed snaps: sudo snap remove <package>

Remove snapd: sudo apt purge snapd

Remove snap directory from home: rm -rf ~/snap

If you receive an error removing snapd then do the following sudo rm -rf /var/cache/snapd then run sudo apt purge snapd

7 Likes

Thanks really for your great help, now my machine is clean from those big, heavy and slow snaps.

1 Like

You don't need to say that just because you personally don't have a use of it or did not really understand all the benefits.

Snap is a nice piece of technology, it is working very well and hassle-free. I am looking forward to seeing more support around it (more community, more apps), instead of always the same FUD.

1 Like

I tried snaps, flatpacks, appimages, they all have big size and try to duplicate existing libs which go in the same direction of what Windows apps do, apt is more flexible and provide really fast and small upgrades which are integrated and shared with all system apps.

3 Likes

Of course, it requires more space, but disk space is cheap nowadays and it comes with many advantages.

You may dislike it and it is fine, but always expressing only criticism without seeing the whole part is destructive for the community and discouraging developers.

For example, your argument that it's like Windows is totally wrong.

First, there is nothing similar in Windows. I think you are confused with Windows apps which in general don't share libraries together, but for totally different reasons. And it lacks great features that Snap brings, like a repository, auto-updates and sandboxing.

Second, the Linux ecosystems should be inspired by a lot of good stuff from Windows: binary signing, kernel security, etc. So, being inspired by Windows is not a problem.

So, please, it is OK you ask and uninstall Snap, it is not OK you criticize it that way.

1 Like

What I hate the most in those new formats is how each company/community defends its new way of installing apps in linux, you find snap supported only by canonical, and flatpack and appimage, and there is no effort to have unique solution or to joint forces, every platform works on its way, this brings fear of using one of those formats.
I think apt could be reworked and enhanced to support downloading/upgrading multiple version of same library for specific apps, and plus apt is widely used and more stable in the debian/ubuntu world.

3 Likes

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

1 Like

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.

2 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.

3 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?

[email protected] ~ $ 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

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.

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?

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!