Uninstall Snap Packages from Ubuntu and Other Linux Distros

Installed Snap package earlier and now you want to uninstall it?

To remove a snap package, use the command in the following fashion:

sudo snap remove package_name

You need to know the exact package name here. How do you get that? Let me discuss all this in a bit more detail.

Uninstall Snap packages

You need the exact package name to remove it. The tab completion works too.

For that, list all the snap packages installed on your system:

snap list

Do you notice some entries with ✓ check marks in the screenshot below? They are ‘verified’ snap packages from official developers.

Listing all the installed Snap packagesListing all the installed Snap packages
Listing all the installed Snap packages

If there are too many packages, you can grep with an appropriate search term.

Once you get the package name, use it to uninstall the package.

sudo snap remove package_name

At least on the Ubuntu desktop, if you don’t use sudo with snap remove, it prompts for the password graphically. But it’s better to use sudo because you need elevated privileges for removing snap applications anyways.

In my case, I installed Spotify on Ubuntu in snap format. Now, I remove it like this:

sudo snap remove spotify

It takes a few seconds and you should see some messages about the removal. By the end of the process, you only see the completion message.

uninstall snap packageuninstall snap package
Uninstalling snap package

And that’s how you remove applications installed in snap format.

But what about removing snap entirely? Not the snap applications but the snap daemon itself.

Remove Snap entirely (not for Ubuntu)

WARNING! Please do not remove snapd and other core snap stuff from Ubuntu. Snap is an integral part of Ubuntu and removing them could have adverse consequences.

For non-Ubuntu distributions, where you manually installed Snap support, removing snapd should not create any problems.

First, make sure that you don’t have any snap packages installed.

snap list

If there are any, remove those snap packages first.

sudo snap remove package1 package2 package3

On Debian, Linux Mint, elementary OS etc, use the apt command to remove snapd:

sudo apt remove --purge snapd

On Fedora-based distributions, use the DNF command:

sudo dnf remove snapd

Later on, you can remove the snap folder from your home directory and /var/cache/snapd if you are particular about that.

Conclusion

This was a quick tutorial for showing the steps for uninstalling snap applications.

Some people have a strong aversion to Snap because of its “close” nature. Personally, I don’t have any special liking or dislike for it. I prefer using apt but when I don’t get the required package or version, I go for other formats like Snap, Flatpak and AppImage.

As I mentioned earlier, please don’t remove snap daemon from Ubuntu. It may leave you with a broken system and neither of us wants that.

Original Article