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 Jammy. 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 snapd, 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 Jammy, you might want to install back Gnome Software Center and Firefox. At least, the matching non snap versions. Luckily, Gnome Software Center is still available in the distro as traditional package.

Gnome Software Center

The flag “–no-install-recommends” is really important here, otherwise, snapd is installed again.

sudo apt --no-install-recommends install gnome-software

Firefox

Unfortunately, Firefox is no longer available in the distro as a traditional package. There are several alternatives, but we are not going to discuss them. Instead, we recommend installing our package (Ubuntu Impish port). To do so, learn here How to install applications from this web site and then:

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