How to Completely Remove and Block Snap App Packages in Ubuntu

This simple tutorial shows how to completely remove and disable the Snap apps in Ubuntu 20.04, Ubuntu 21.04, Ubuntu 21.10. And it works on Debian and all Ubuntu based systems, e.g., Elementary OS, Linux Mint.

Snap is an universal Linux package format developed by Canonical, the company behind Ubuntu. It runs in sandbox via a separate snapd daemon. A snap app bundles most run time libraries, so it can be a solution to the painful dependency problem.

Some users don’t like Snap either for security concerns or since it takes more system resource, such as disk space. And Linux Mint 20 blocks Snap out-of-the-box because it makes less choice for users.

How to completely remove Snap

Firstly, search for and open terminal from your system app launcher. When it opens, run command to remove snapd daemon:

sudo apt purge snapd

Type user password while no asterisk feedback, and hit Enter.

This command will remove all your installed Snap apps, as well as Ubuntu Software since it's Snap Store.

Secondly, open File manager and remove the snap folder in your user home directory.

How to Block Snap

Like Linux Mint 20, you can easily block snap so it will never go back. To do so, open terminal and run command:

sudo gedit /etc/apt/preferences.d/nosnap.pref

It will create a configuration file and open it with gedit text editor.

For Ubuntu flavors and other based systems, replace gedit with your system text editor, or use the universal nano command line text editor.

When the file opens, add following lines and save it.

# To prevent repository packages from triggering the installation of snap,
# this file forbids snapd from being installed by APT.

Package: snapd
Pin: release a=*
Pin-Priority: -10

Finally, apply change by running apt update command in terminal:

sudo apt update

Install Gnome Software as Ubuntu Software

For those sticking to Ubuntu Software for installing or uninstalling apps, you can use Gnome Software.

Gnome Software has totally same user interface to the previous Snap Store (Ubuntu Software). It was default in old Ubuntu releases.

To install Gnome Software, simply open terminal and run command:

sudo apt install gnome-software

To make it “Ubuntu Software“, you can change the shortcut icon as well as software name by running command to edit the .desktop file:

sudo gedit /usr/share/applications/org.gnome.Software.desktop

When the file opens, do:

  • Change the value of “Name” to Ubuntu Software.
  • Also set the “Icon” to software-store.

Finally save the file and enjoy!

Merilyn Ne
Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.