How to remove snap from Ubuntu

<  Previous: How to report a bug
Next: How to create a packaging environment with sbuild >

I’m not going to dwell too much on the reasons for you to ditch snapd, nevertheless, the most common ones are that snap packages:

  • consume more space;
  • take more time to install;
  • take longer to launch and might be less performant;
  • don’t match your Ubuntu theme.

Whatever your reasons are, this should help you getting rid of it.

Steps

The steps below were executed on Ubuntu Impish. Other versions might require slight adjustments, although the logic should be the same.

  1. List the installed snaps
snap list
  1. Remove the snap packages.

You should remove all packages, except core, which is not removable.

sudo snap remove --purge <snap name>
  1. Uninstall snapd
sudo apt autopurge snapd
  1. Remove snapd cache and preferences.

These directories only exists if you ran a snap before.

sudo rm -Rf /var/cache/snapd/
rm -Rf ~/snap
  1. Optional: Install back the non snap versions of the packages removed earlier.
sudo apt install <package name>

In case of Ubuntu Impish, you might want to install back Gnome Software Center and Firefox. Do not forget the flag “–no-install-recommends” with “gnome-software”, otherwise, snapd is installed again.

sudo apt --no-install-recommends install gnome-software
sudo apt install firefox
  1. Optional: Preventing snap from installing again.

You might want to prevent snap from being installed again (for instance, in case you try to install chromium).

sudo apt-mark hold snapd
<  Previous: How to report a bug
Next: How to create a packaging environment with sbuild >

 

No Comments

Add your comment