Safe to Delete

Ubuntu Snap Package Cache (/var/lib/snapd/snaps)

Quick Answer: /var/lib/snapd/snaps stores old disabled versions of Snap packages. Removing old revisions is safe and frees up gigabytes on Ubuntu.

Bottom Line: You can safely delete old, disabled Snap package revisions in Ubuntu. By default, Canonical’s Snap package manager keeps up to 3 older versions of every installed app, which wastes 2 GB to 10 GB+ of drive space.


What is the Ubuntu Snap Cache Folder?

Located at /var/lib/snapd/snaps, this directory stores downloaded .snap package files for applications installed via Snap (such as Firefox, Chromium, VS Code, Spotify, or VLC).

When a Snap application updates in the background, Snap does not delete the previous package version. Instead, it retains old versions as backups in case you need to revert to a prior software revision. Over time, having multiple revisions of heavy apps like VS Code or Chromium consumes gigabytes.


Can You Delete Old Snap Revisions?

✅ Yes, it is 100% safe to remove disabled revisions.

  • Active apps stay working: Your currently active Snap application versions are unaffected.
  • Frees space: Removing disabled revisions reclaims disk space on smaller Linux server or laptop SSDs.

How to Safely Clean Up Old Snap Packages

Method 1: Set Snap Retention Limit to 2 Revisions (Permanent Fix)

Run this command in terminal to force Snap to store a maximum of 2 package revisions instead of 3:

sudo snap set system refresh.retain=2

Method 2: Script to Delete All Disabled Snap Revisions (Instant Cleanup)

Run the following Bash one-liner script to remove all disabled/old snap packages automatically:

sudo snap list --all | awk '/disabled/{print $1, $3}' | while read snapname revision; do
    sudo snap remove "$snapname" --revision="$revision"
done

What Happens After You Run It?

  • You instantly reclaim 2 GB to 10 GB of space in /var/lib/snapd/snaps.
  • All installed Snap applications continue to open and run normally.

Discussion

Loading authentication...

Related in installers

Ubuntu APT Package Cache (/var/cache/apt/archives)

/var/cache/apt/archives stores downloaded .deb package installer files. Running sudo apt clean is safe and reclaims gigabytes of disk space.

Safe to Delete

Flatpak Package Cache & Unused Runtimes (/var/lib/flatpak)

/var/lib/flatpak stores Flatpak desktop apps and runtimes. Pruning unused runtimes with flatpak uninstall --unused is safe and frees space.

Safe to Delete

Panther Folder (C:\$WINDOWS.~BT\Sources\Panther)

The Panther folder stores setup and upgrade log files for Windows installation. Deleting Panther is safe and frees up hidden upgrade logs.

Safe to Delete
Back to all files