[HOW TO] Remove snapd and flatpak ... should you wish to

I don't know if the security issues are still the same (apps having root access, no sandboxing), this also could apply to 'app images' as discussed in this 2018 YouTube video by Distro Tube - and now it appears to be no longer there!
Anyhow if you prefer not to have snapd on your Zorin install, this is how to remove it:

Commands under the video.

If you also want to remove flatpaks follow the guide here:

Whilst it is aimed at Linux Mint it also works under Zorin 16 as does the snap removal instructions.
However, a word of warning! When I removed flatpak in Plasma it did warn me that xrandr would be removed - so now I only have one working monitor - a downside of the way things are going in Linux - too much interdependence equals reduction in user choice which is what GNU/Linux is supposed to be about in the first place!

6 Likes

3 posts were merged into an existing topic: Discussing How to remove snapd and flatpak … should you wish to

Then you may release your wrath upon its tender innards.

1 Like

Done, everything is removed :slight_smile:

2 Likes

Linux Mint tutorial eradicates Flatpak completely, it's not my intention. I want to remove Flatpak from 'Software' app and apt - but keep existing flatpak installs. Can I remove 'flathub' repository without breaking the system? I can see even gtk themes are flatpaked in Zorin.

What applications are you referring to? There might be an alternative option using Synaptic Package manager.

I believe these are just flatpak duplicates, not needed if you are not using Flatpak's and remove Flatpak. Others may be able to give second opinion to confirm this understanding.

1 Like

You can achieve this with

sudo apt remove gnome-software-plugin-flatpak

1 Like

Thanks for answering. Result of 'flatpak list' on my almost new Core install:

Thanks! That did it.
Sorry for my late response, I'm new to Zorin and customizing fresh install takes a lot of time.
Again, big thanks.

Just installed Zorin 18 Core and replaced Brave with Zen Browser. Interestingly, Zen has produced (nabbed?) a search engine called Perplexity. It appears to use A.I. but not sure. But interestingly, as well as commands to remove snapd from the system it also profers you to create a .conf file to ensure it never resurrects itself:

" To remove Snap (the package management system from Canonical) from your Linux system, you need to first remove all Snap packages, then uninstall the Snap daemon itself, and finally clean up any residual files. This process is most commonly required on Ubuntu but works for other distributions as well. Here are the detailed steps:

Step-by-Step Snap Removal

  1. List installed snaps.
  • Run: snap list

  • Note names of all snap packages installed on your system.

  • Remove Snap packages.

  • Run: sudo snap remove --purge package_name for each listed package.

  • Example for typical pre-installed snaps:

  • text

sudo snap remove --purge firefox
sudo snap remove --purge snap-store
sudo snap remove --purge gtk-common-themes
sudo snap remove --purge gnome-3-38-2004
sudo snap remove --purge core20
sudo snap remove --purge snapd-desktop-integration
  • Some systems may have packages with different names (e.g. core24, gnome-46-2404, etc.).
  • Stop and disable Snap services.

text

sudo systemctl disable snapd.service
sudo systemctl disable snapd.socket
sudo systemctl disable snapd.seeded.service
sudo systemctl mask snapd.service
  • This ensures Snap does not start or run in the background.

  • Remove Snap cache and user data.

text

sudo rm -rf /var/cache/snapd/
rm -rf ~/snap
  • The first command removes cached system files, and the second removes the Snap directory from your home folder.

  • Uninstall Snapd package.

  • On Ubuntu/Debian:

  • text

sudo apt autoremove --purge snapd
  • On Fedora:
  • text
sudo dnf remove snapd
  • On Solus or other distros, adapt the command to your package manager.
  • (Optional but recommended) Block snapd from being reinstalled.
  • Create a preferences file:
  • text
sudo nano /etc/apt/preferences.d/nosnap
  • Add:
  • text
Package: snapd
Pin: release a=*
Pin-Priority: -10
  • Save and exit, then update your system:
  • text
sudo apt update
  • This prevents snapd from returning during future updates.

Important Notes

  • Removing Snap may disable some features in Ubuntu, such as Ubuntu Software Center, Livepatch, or pre-installed apps like Firefox, which use Snap by default. Alternatives can be installed (e.g., Firefox via a PPA, GNOME Software Center via apt).

  • For production machines, consider disabling Snap instead of complete removal to avoid breaking system features.

  • For a full clean, some residual folders may also exist in /home/other-user/snap or managed by daemons; delete these as needed.

This process will completely remove Snap and its traces from your Linux system."

Just to add, Zorin 18 does not come with any snap packages pre-installed, so you only need to follow the step headed 'Stop and disable Snap services'.

[Screenshot of Perplexity in Zen Browser: