1. Home
  2. Linux
  3. Disable snaps ubuntu

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!

5 Comments

  1. You might also want to prevent snapd creeping back in using `sudo apt-mark hold snapd` 🙂

  2. SEE END LINE TO probably SAVE A TON OF TIME…

    WAY easier: download a live bootable repair ISO or any bootable live linux – latest ubuntu is good, then if you don’t have startup disk creator, click the 9 dot (hamburger?) icon to open applications and run the startup disk creator from there. Use a spare USB 4GB or bigger, that you can erase – and make a startup disk out of it using the bootable live ISO you downloaded. Then, reboot, and select whatever key as it’s starting to boot to let you select which disk to boot.. (mine is F8, but it should say, or else try del, and get into setup to make the new bootable disk you made as the default boot) .. select the bootable disk you just made if you got into the menu, or reboot if you just changed it in the BIOS.. boot up the live linux.. Once it’s up, run either disks or gparted, whichever you’re used to, or have. Select the main drive you have Ubuntu installed on (for example /dev/sda – the top one in disks, if you have more than one drive installed) Then, click the button near the top right (in disks) – or I think you can just right-click the drive for a menu in gparted.. and select format disk, or similar in gparted, then just click the format button.
    Now – snapd is totally removed… as a bonus, so is Ubuntu, and all the annoying files that were on that drive.

    Hang on… the answer all neatly printed out above said: “Uninstall pre-installed Snap packages from Ubuntu” – then “Remove Snapd from Ubuntu” — but I see you actually asked how to DISABLE snaps. Well, I guess that way and my way will disable snaps… just mine will remove everything else (*everything*) too, whereas the instructions on this page will only permanently remove snap-everything…

    I think we’ll have to go find another page that actually answers your question.. I figured the answer was just remove snap-everything permanently, and I just added in the bonus of removing everything-everything…

    AS I SAID ON 1st LINE: none of anything on this page, including what I wrote above will help you to just disable snap or disable anything else… just permanently remove snap-all or everything on the drive, using my way.. off to find a page that actually answers your question. Sorry I wasn’t any more help than the original answer. Really, you could just go all “Mr. Robot” – yank out your hard drive and have a metal drill ready, and drill a couple holes in it… everything will be permanently removed and disabled. 😉

  3. apt install chromium?
    Canonical has already said it will move towards replacing source apt packages with “fake” apt packages without binaries and with “snap install xyz” apt-pre-install scripts. I think its much better to just install an Ubunutu derivative which comes with snap already removed and properly tested. PopOS and Mint come to mind.

  4. Holy crap, thank you so much for these steps. Ever since upgrading to 20.04 and getting snap in there, it bogged down my server horribly. This restored it! Cheers~

  5. Thanks for this post!

    Snap is a stupid idea. All the bloat is ridiculous, and the fact that you have to look on the internet to make some snaps work (like nmap, for instance) by finding extra snap commands you need to enter to make it work (in nmap’s case to give it access to the network, so it can actually do anything at all!) is even more ridiculous!

    I wish they’d reconsider and make the default Ubuntu install snap-free!