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 and Ubuntu 22.04 LTS.

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

1.) Firstly, open terminal by either searching from ‘Activities’ overview or pressing Ctrl+Alt+T on keyboard.

2.) When terminal opens, run the command below to list all installed Snap packages:

snap list

3.) Next, remove the Snap app packages by running the command below multiple times:

sudo snap remove --purge PACKAGE_NAME

Replace “PACKAGE_NAME” according to the previous command outputs. For example, use sudo snap remove --purge snap-store to remove Ubuntu Software.

4.) Run the command in step 3.) multiple times, until all snap apps are removed. The command won’t work for snapd, you have to run apt command below to remove it:

sudo apt purge snapd

Type user password (no asterisk feedback) when it asks, and hit Enter.

Finally, open File manager and remove the snap folder in your user home directory to clean up personal app data.

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.

Ubuntu 22.10 + now defaults to Gnome Text editor, so you need to replace gedit in command with gnome-text-editor. Or use nano, the universal command line text editor instead.

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 to refresh package cache:

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), which 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!

Exit mobile version