Remove Ubuntu Snap

This guide shows you how to remove snap packages from an Ubuntu System

Remember to install a browser before removing snaps on a Ubuntu System.

  1. View all snaps

    snap list
    
  2. Remove snap packages in the following order. Firstly remove Firefox. Secondly, snap-store and the other packages that you see in the above command output in your system.

    sudo snap remove --purge firefox
    sudo snap remove --purge snap-store
    sudo snap remove --purge gnome-*
    
    sudo snap remove --purge gtk-common-themes
    sudo snap remove --purge snapd-desktop-integration
    sudo snap remove --purge bare
    sudo snap remove --purge core*
    sudo snap remove --purge snapd
    
  3. Finally, remove the snap daemon via apt command.

    sudo apt remove --autoremove snapd
    sudo nala --autoremove
    
  4. So, to stop that, we need to create an apt preference file in /etc/apt/preferences.d and create a new preference file to stop snap.

    sudo -H gedit /etc/apt/preferences.d/nosnap.pref
    
  5. And add the following lines, then save the file.

    Package: snapd
    Pin: release a=*
    Pin-Priority: -10
    
  6. Returning to the topic, once you save and close the above file, run the below again from the terminal.

    sudo nala update
    

Refrence: Source