Remove Snap from Ubuntu

Remove Snap from Ubuntu

Introduction

Today I installed Chromium Browser to isolate few web accounts from my main browser sessions. Easy operation sudo apt-get inst..  press enter and done. Later I noticed a new folder in my home directory called snap. Snap? what's that? I never created such a folder as far as I remember. I went to check and research. It turns out Canonical is doing some kind of Docker for deb packages. But wait I used apt, let me check. So snap installation is the default for Chromium now. No question asked to me, someone decided I want to use it. And I hate when someone decides for me. I don't care what problem Canonical tries to solve for the masses. And I don't need a bloated version of deb packages mounted on my filesystem and creating directories in my home folder. Good, old deb packages with apt work for me just fine. There come instructions to wipe out this heretic piece of software.

Remove Snaps

Ubuntu comes with preinstalled snaps. To list them run:

snap list

On my KDE Neon distribution I see the following result:

Name               Version           Rev   Tracking         Publisher   Notes
core18 20200311 1705 latest/stable canonical✓ base
gnome-3-34-1804 0+git.2c86692 24 latest/stable/… canonical✓ -
gtk-common-themes 0.1-30-gd41a42a 1502 latest/stable/… canonical✓ -
snapd 2.44.3 7264 latest/stable canonical✓ snapd

Depending on your distro list may be different. You always needed this software preinstalled, right? :)

Remove all snaps except the core. The core snap is not in the list above, because it is not preinstalled in the KDE distro.

Run:

sudo snap remove gtk-common-themes
sudo snap remove gnome-3-34-1804
sudo snap remove core18
sudo snap remove snapd

Unmount snap service

First, run the df command to find out the ID of a service. And then run:

sudo umount /snap/core/xxxx

Purge snapd Package

Let's wipe this Frankenstein:

sudo apt purge snapd

And last cleaning for filesystem:

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

Now we are clean from this strange solution. If I wanted someone to make a decision for me, I would use Windows not Linux guys. Canonical, you can keep doing your great work and developing projects, but please at least ask next time before you make such global changes to my system. We all still remember Unity and how it ended :)

P.S If you still want to use Chromium find maintained PPA and install from there. The same goes for other packages where the snap version is now by default.

For example:

sudo add-apt-repository ppa:saiarcot895/chromium-beta
sudo apt-get update
sudo apt-get install chromium-browser

Link
No links yet.