1. Home
  2. Linux

How to disable Snaps in Ubuntu

Snap packages are quickly becoming the primary way that Ubuntu users consume software. Despite Snaps dominating Ubuntu, many users still opt to avoid Snap packages in favor of Apt packages that have long been available in Ubuntu.

If you’re not a huge fan of Snap packages, but love using Ubuntu, this guide is for you. In it, we’ll go over how you can remove Snap from your Ubuntu system and make it so that your system will no longer have access to the Snap store or anything like that.

Uninstall pre-installed Snap packages from Ubuntu

Every release of Ubuntu Linux has a few Snap packages pre-installed. The reason that some Snaps come installed is that Ubuntu developers like Snaps and want to show users what it can do.

Remove pre-installed Snaps

Before we can deal with removing the Snap runtime from the system, and making it so that it is entirely disabled, we need to remove these Snaps. In Ubuntu 20.04, there are 6 pre-installed Snap packages. These packages are Core, Core18, the Gnome package, common themes, Snapd, and the Snap store.

Sadly, unlike Apt, it isn’t possible to uninstall all of these packages in bulk. You must manually remove each one of these packages by hand.

Note: keep in mind, you may have Snaps installed on your system that we do not cover in the tutorial. To view all installed snaps, do snap list. Then, snap remove packagename.

To uninstall the Core Snap, run sudo snap remove on the “core” package. Please note that you may need to uninstall Core last or close to last, as some of the pre-installed Snaps rely on it.

sudo umount /snap/core* -lf
sudo snap remove core

To get rid of Core18, run the uninstall command on the “core18” package. Please note that this Snap may need to be removed last, as many of the pre-installed Snaps interact with it as a dependency.

sudo snap remove core18

To get rid of Gnome, run the uninstallation command on the “gnome-3-1804” package.

sudo snap remove gnome-3-34-1804

To remove the common GTK theme snap from your system, you must run the uninstallation command on the “gtk-common-themes” package.

sudo snap remove gtk-common-themes

To get rid of the Snapd snap, run the uninstallation command on “Snapd.”

sudo snap remove snapd

Lastly, to remove the Snap package store from your Ubuntu computer, you’ll need to run the uninstallation command on the “snap-store” package.

sudo snap remove snap-store

Uninstall other Snap packages

Once all of the pre-installed Snaps are taken off of the system, run the snap list command. Make sure no other packages exist in the list. If there are more Snp packages shown in the list, you will need to uninstall them. You cannot disable Snap if existing Snaps are mounted and in use. Remember, you can easily uninstall a Snap by doing the following.

Step 1: Run snap list.

Step 2: Look in the “Name” column for the name of the package.

Step 3: Run snap uninstall nameofsnap.

Remove Snapd from Ubuntu

Now that all of the pre-installed Snap packages are removed from your Ubuntu PC, it is time to purge Snapd. Snapd is the background program that handles all of your Snaps, and if you do not remove it, Snaps will still be enabled on Ubuntu.

To purge Snapd, open up a terminal window by pressing Ctrl + Alt  + T or Ctrl + Shift + T on the keyboard. Then, when the terminal window is open, run the sudo apt remove snapd –purge command.

The remove command will delete Snapd from the system and uninstall it from Ubuntu’s package list. The –purge flag will tell Ubuntu to not only uninstall it but to erase all configuration files and related data from Ubuntu. Purging is essential because, without it, Snapd will leave system files all over your PC.

sudo apt remove snapd --purge

When the command is complete, you’ll have purged the Snap store and any ability to run Snaps from your Ubuntu PC.

Deleting folders

Once the Snapd runtime is removed from your Ubuntu system, your Ubuntu PC will no longer have access to the Snap store or be able to run Snaps via snap install. However, the uninstallation isn’t complete. You still need to delete the Snap folders from your home directory.

First, you must delete the “snap” directory in your home folder. This folder handles all of your system settings for Snap apps. To delete it, run the rm -rf command below.

sudo rm -rf ~/snap

Next, the /var/snap/ folder needs to be deleted. To delete it, run the rm -rf command with the sudo command.

sudo rm -rf /var/snap

Lastly, the /var/lib/snapd folder needs to be deleted. To get rid of it, you’ll need to run rm -rf command with the sudo command.

sudo rm -rf /var/lib/snapd

When all three of these folders are removed from the system, reboot Ubuntu. Once Ubuntu comes back online, it’ll be Snap free! Enjoy!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.