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

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: