How to Stop the Ubuntu ‘Snapd’ Service from Creating Loop Devices

The Proliferation of Virtual Disks

Ubuntu utilizes “Snap,” a universal package manager developed by Canonical. Unlike traditional .deb packages which extract files directly into the standard Linux filesystem, Snap packages are distributed as compressed SquashFS filesystem images. When you install a Snap application (like Firefox or LXD), the snapd service mounts this compressed image as a read-only “loop device.”

If you install 20 Snap applications, you will suddenly have 20 virtual loop devices attached to your system. If you run the lsblk or df -h command in the terminal, your output will be completely overwhelmed by dozens of /dev/loopX entries, making it incredibly difficult to see your actual physical hard drives. If you find this clutter unbearable and prefer to manage software via traditional apt packages, you must disable the snapd service entirely to stop the loop device creation.

How to Stop Snapd and Unmount Loop Devices

You must purge the Snap daemon to prevent it from creating these mounts.

Warning: This will remove all currently installed Snap applications (including the default Firefox browser on newer Ubuntu versions).

  1. Open your Ubuntu Terminal or connect via SSH.
  2. First, list your installed snaps so you know what you are losing:
snap list
  1. Stop the snapd service immediately:
sudo systemctl stop snapd.service
  1. Remove the Snap daemon and its core dependencies entirely:
sudo apt-get purge snapd
  1. (Optional) Clean up the leftover cache and configuration directories:
sudo rm -rf /var/cache/snapd/
sudo rm -rf ~/snap

When you run lsblk again, your terminal output will be clean, displaying only your actual physical drives and partitions. You can now use apt to install traditional, non-containerized versions of your software.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.