In recent years, Canonical (the company behind Ubuntu) has aggressively pushed its “Snap” package format. Snaps are containerized software packages that include all their dependencies bundled into one massive file. By default, Ubuntu runs a background daemon called snapd to manage these packages. It automatically mounts loop devices for every installed snap, silently updates them in the background (which you cannot easily stop), and heavily modifies your system paths to prioritize Snap apps over traditional APT packages.
For Linux purists, server administrators, and power users, this is unacceptable. Snaps consume significantly more disk space, launch slower than native applications (especially Firefox), pollute the lsblk and df terminal outputs with dozens of loop mounts, and force automatic updates that can break production servers. If you want a clean, traditional Debian-like experience relying solely on apt and Flatpak, you must completely eradicate snapd from your Ubuntu installation.
Uninstalling and Purging Snapd
Removing the Snap daemon is a destructive process. Before proceeding, you must understand that this will completely delete any application currently installed via Snap (which, on modern Ubuntu, includes the default Firefox browser and the Ubuntu Software Center). You will need to reinstall them via APT later.
- Open a Terminal session.
- First, you must manually list and remove any installed snap packages. List them by running:
snap list - Remove every package on that list one by one using the remove command (start with the user apps like Firefox, then remove the core packages like
core20andsnapdlast):sudo snap remove [package_name] - Once the list is entirely empty, you can purge the daemon itself from the APT package manager:
sudo apt-get purge snapd - Press Y to confirm the complete removal of the software.
- Clean up the orphaned directories that snapd leaves behind in your home and system folders:
sudo rm -rf ~/snapsudo rm -rf /snapsudo rm -rf /var/snapsudo rm -rf /var/lib/snapd
Preventing Ubuntu from Reinstalling Snapd
If you stop here, you are not safe. If you attempt to install certain packages via APT (like Chromium), Canonical has rigged the APT repository to act as a Trojan horse. APT will silently download and reinstall snapd, and then install the Snap version of the app instead. You must block this behavior using APT Preferences.
- Open the APT preferences directory to create a blocklist:
sudo nano /etc/apt/preferences.d/nosnap.pref - Paste the following three lines exactly into the text editor:
Package: snapdPin: release a=*Pin-Priority: -10 - Save the file (Ctrl + O, then Enter) and exit the editor (Ctrl + X).
By assigning a negative priority (-10) to the snapd package, you have instructed APT to violently reject any attempt to install it. Your Ubuntu system is now permanently sterilized. It will never mount another Snap loop device, and you are free to manage your software entirely through traditional Debian repositories.