Fully Remove Snap from Ubuntu 22.04

List & Remove all snap packages

snap list

Remove everything you find in the list, starting with non-canonical packages. The following should work on a fresh install of Ubuntu 22.04.

sudo snap remove --purge firefox
sudo snap remove --purge gnome-3-38-2004
sudo snap remove --purge gnome-42-2204 
sudo snap remove --purge gtk-common-themes 
sudo snap remove --purge snapd-desktop-integration 
sudo snap remove --purge snap-store 
sudo snap remove --purge core20
sudo snap remove --purge core22
sudo snap remove --purge bare
sudo snap remove --purge snapd

Prevent apt from reinstalling snapd

Create a new file in /etc/apt/preferences.d/ and called nosnap.pref

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

Add the following to the file & save.

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

Remove remnants

Remove user snap directory.

rm -rf ~/snap/

Remove cache directory for snapd.

sudo rm -rf /var/cache/snapd/

Daniel Iser is a professional WordPress plugin developer, and the author of plugins such as Easy Modal & Popup Maker. Founder of Wizard Internet Solutions he has been working with WordPress for over 7 years creating websites and tools for clients & blog authors.

Follow on:


  1. Phil on October 23, 2023 at 4:36 am

    After loading 22.04.3 i tried to run a program in C and all I got was a message saying that I did not have permission. I spent the rest of the day trying to sort it including eliminating snap. The instructions did not work and all I got at root was a snap file. Adding insult to injury after supposedly removing snap, I could not log in.
    Tomorrow I’ll be going back to a non snap environment.
    I’m not an expert and only use C as a tool for modelling during feasibility studies I just need something that just works.

    • danieliser on October 26, 2023 at 8:21 pm

      Sorry to hear the above didn’t work for you. I honestly can’t stand the snap package manager. Pretty much nothing recommends it as the official install method either, not sure why its still pushed.

Leave a Comment

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