How to Kill SNAP on Ubuntu Server.

Packages in Linux are managed and distributed via repositories. Package management in Debian-based distributions is officially handled by APT (Advanced Packaging Tool). And of course; as you would have guessed snap is another package management systems.

How to Kill SNAP on Ubuntu Server.
Image credit: Unknown. Please contact us if you are the owner.

So..., what is Snap


Snap is a software package distribution system, and the packages it distributes are referred to as Snap packages. Because Snap packages include both the software and its dependencies, they are typically large and take up more space on your system. Snap is praised for the following benefits:

  • The Snap update process is automatic.
    Users cannot prevent a snap app from updating, only delay the process.
  • Snap bundles package dependencies inside the package.
    While this approach negatively affects the package size, the main
    benefit is that users always have the supported and tested version of the
    package.
  • Allow a package to be installed more than once.


So, what's all the fuss about Snap?

Snap is included by default in the most recent version of Ubuntu, and users frequently complain about being slow to run, in part because they are actually compressed filesystem images that need to be mounted before they can be executed. Without a doubt, Snap is an excellent alternative to APT, but it still has a number of flaws. Concerns have also been raised about its security. And according to the Linux Mint developer, Snap support has recently been dropped entirely because these packages are not adequately monitored and managed. Because of these annoyances, many Linux users avoid using Snap packages.

How to disable Snap on Ubuntu


Step 1:
Let’s check the list of installed Snaps using:

$ snap list

OUPUT

Name               Version             Rev    Tracking       Publisher   
core18             20210507            2066   latest/stable  canonical✓  
gnome-3-34-1804    0+git.3556cb3       72     latest/stable  canonical✓  
gtk-common-themes  0.1-52-gb92ac40     1515   latest/stable  canonical✓  
lxd                4.0.6               20326  4.0/stable/…   canonical✓  
snap-store         3.38.0-63-g766b86f  542    latest/stable  canonical✓  
snapd              2.50.1              12057  latest/stable  canonical✓  

Step 2:

Now remove these packages and make sure that you are removing Snaps in that right order as below.

$ sudo snap remove snap-store

OUTPUT

snap-store removed
$ sudo snap remove gtk-common-themes

OUPUT

gtk-common-themes removed
$ sudo snap remove gnome-3-34-1804

OUPUT

gnome-3-34-1804 removed

Step 3:

Unmount the snap core services.

Ubuntu 20.04

$ sudo umount /snap/core#/<core-id>

Obtain the "<core-id>" by running the df command.

Ubuntu 20.10

$ sudo umount /var/snap

Step 4:

Remove and purge the Snapd package.

$ sudo umount /var/snap

OUTPUT

The following packages will be REMOVED:
  snapd*
0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
After this operation, 126 MB disk space will be freed.
Do you want to continue? [Y/n]

Step 5:

Remove any lingering Snap directories.

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


That’s it; Snap has been totally removed from your system.
Verify it by running snap --version:

$ snap --version 

OUTPUT
command not found: snap

Ps:
If you use the Chromium browser, you should add the PPAs before installing the browser, because installing the default chromium-browser package will reinstall Snapd... Real fiasco!

Keep Us Caffeinated  ⦿ ⦿