Snap on Shani OS — The Optional App Ecosystem

Snap is an optional app ecosystem on Shani OS. It is pre-configured — snapd.socket is enabled at boot, the @snapd Btrfs subvolume stores all Snap data, and snap packages survive every OS update and rollback untouched.

Flatpak is the recommended primary choice for GUI applications on Shani OS. Snap is available as a complement when an app you need is only on the Snap Store, or when you have a specific reason to prefer it.

Full reference: docs.shani.dev — Snaps.

---

How Snap Is Set Up

Snap data lives in the @snapd Btrfs subvolume, mounted at /var/lib/snapd. This is completely independent of both OS slots. Whether you boot @blue or @green after an update or rollback, the same Snap installs are there.

snapd.socket is socket-activated — the daemon starts on-demand when first accessed, not at every boot.

# Verify snapd is available
snap version

# Check snapd service status
systemctl status snapd.socket

---

Installing and Managing Snaps

# Search the Snap Store
snap find "video player"
snap find firefox

# Install a snap
snap install vlc
snap install firefox
snap install code --classic    # classic confinement (broader access)
snap install slack --classic

# List installed snaps
snap list

# Update all snaps
snap refresh

# Update a specific snap
snap refresh vlc

# Remove a snap
snap remove vlc

# See snap info (version, confinement, publisher)
snap info vlc

Snaps appear in your application launcher automatically after installation, just like Flatpak apps.

---

Classic vs Strict Confinement

Most snaps use strict confinement — they run in a sandbox with explicit access controls, similar to Flatpak's sandbox.

Some snaps use classic confinement — they run with the same access level as a traditionally installed application. Classic confinement is required for developer tools like VS Code, because they need to access arbitrary project files, run compilers, and interact with the host system extensively.

# Strict confinement (sandboxed)
snap install vlc

# Classic confinement (less restricted — you will be prompted to confirm)
snap install code --classic
snap install go --classic
snap install node --classic

---

Snap vs the Full Ecosystem

Flatpak is the primary recommendation for GUI apps — larger catalogue, more granular sandbox permissions via Flatseal, fully open-source end-to-end. Snap is the configured fallback when an app exists only on the Snap Store. Both coexist without conflict, each in its own Btrfs subvolume.

The Shani OS Software Ecosystem covers the complete decision guide including Nix, Distrobox, AppImage, Podman, and VMs.

Storage Efficiency

Snap packages are stored in /var/lib/snapd/snaps/ as squashfs images — each version of each snap is a separate file. This means upgrading a snap adds a new version file alongside the old one, which is only removed after a few revisions.

To clean up old snap revisions:

# See snap disk usage
du -sh /var/lib/snapd/snaps/

# Remove old revisions manually
snap list --all
# Note the revision numbers of old versions, then:
snap remove vlc --revision=1234

# Automatic cleanup (remove all but 2 most recent revisions)
snap set system refresh.retain=2

---

Resources

---

Built in India 🇮🇳 · Immutable · Atomic · Zero Telemetry