How to Use Snap on Linux
Learn how to install snapd, find and install snaps, choose channels, control automatic refresh schedules, understand classic confinement, and remove snap entirely.
Before you start
- ▸sudo or root access on the target machine
- ▸Working internet connection to reach the Snap Store
- ▸systemd-based init system (required by snapd)
Snap is Canonical's cross-distro package format. A snap bundles an application with its dependencies into a single compressed image, runs in a sandboxed environment, and updates automatically. You'll find it pre-installed on Ubuntu, and it's available on most other major distributions. This guide covers installing and configuring snapd, finding and installing snaps, understanding channels and confinement, controlling update schedules, and cleanly removing snap when you no longer want it.
Installing snapd
Ubuntu 18.04 LTS and later ship snapd by default. On other distros you need to install it first.
Debian / Ubuntu
sudo apt update && sudo apt install snapd
Fedora / RHEL / Rocky
sudo dnf install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
The symlink is required so that classic-confined snaps can find their expected path. Log out and back in (or reboot) after creating it.
Arch Linux
sudo pacman -S snapd
sudo systemctl enable --now snapd.socket
Alternatively install snapd from the AUR if it is not yet in the official repos for your mirror snapshot.
Verify snapd is running
sudo systemctl status snapd
You should see active (running). Also confirm the base snap is present:
snap list
Output will vary but will show at minimum core20 or core22 and snapd itself.
Finding and Installing Snaps
Searching the store
snap find "video editor"
This queries the Snap Store and returns matching package names, versions, and short descriptions. You can also browse snapcraft.io/store in a browser.
Installing a snap
sudo snap install vlc
Most snaps install in strict confinement by default — the app is sandboxed and has limited access to the host system.
Classic confinement
Some developer tools (compilers, IDEs, shells) need broad filesystem access that the standard sandbox prevents. These use classic confinement and require the --classic flag explicitly:
sudo snap install code --classic
Classic snaps are not sandboxed. They behave like traditionally installed software, so only install classic snaps from publishers you trust. The store flags which snaps require classic; you cannot pass --classic to a strict snap — snap will reject it.
Getting snap details before installing
snap info vlc
This shows the publisher, available channels, installed version, and confinement type. Always worth checking before installing an unfamiliar package.
Understanding Channels
Every snap is published across one or more channels. A channel is a combination of a track and a risk level:
- Track — usually a major version series, e.g.
latestor7 - Risk level —
stable,candidate,beta, oredge
The default channel is latest/stable. To install from a different channel:
sudo snap install node --channel=20/stable --classic
To switch a snap you already have installed to a different channel:
sudo snap refresh vlc --channel=latest/beta
Switch back to stable when you want the production release:
sudo snap refresh vlc --channel=latest/stable
snap info <name> lists all available channels and the version published to each.
Managing Refresh (Update) Schedules
By default snapd checks for updates four times per day and applies them automatically — even while the app is running (a new revision is prepared and applied on next launch). This is useful for security, but can be disruptive on metered connections or production systems.
Check the current refresh timer
snap get system refresh.timer
Restrict updates to a maintenance window
The following example restricts automatic refreshes to Sunday between 02:00 and 04:00:
sudo snap set system refresh.timer="sun,02:00-04:00"
Hold updates for a specific snap
Available since snapd 2.58. This pauses automatic refreshes for a named snap for up to 90 days:
sudo snap refresh --hold=30d vlc
Hold all snaps temporarily
sudo snap refresh --hold
The hold expires after 90 days maximum. This does not prevent security-critical refreshes that Canonical marks as urgent.
Trigger a manual refresh
sudo snap refresh
Refreshes all installed snaps immediately. To refresh a single snap:
sudo snap refresh vlc
View refresh history
snap changes
Useful Day-to-Day Commands
| Task | Command |
|---|---|
| List installed snaps | snap list |
| See all revisions on disk | snap list --all |
| Revert to previous revision | sudo snap revert vlc |
| Disable a snap (keep installed) | sudo snap disable vlc |
| Re-enable a snap | sudo snap enable vlc |
| Remove a snap | sudo snap remove vlc |
Snapd keeps the two most recent revisions on disk by default to allow rollback. Old revisions consume space in /var/lib/snapd/snaps/. Remove old revisions manually:
sudo snap remove vlc --revision=123
Completely Removing Snapd
Some users prefer to remove snap entirely — for example on Ubuntu where it conflicts with preferred apt-native packages. Do this carefully; removing snapd also removes all installed snaps and their data.
Remove all installed snaps first
snap list | awk 'NR>1 {print $1}' | xargs -I{} sudo snap remove {}
Remove snapd on Debian / Ubuntu
sudo apt purge snapd
rm -rf ~/snap /snap /var/snap /var/lib/snapd /var/cache/snapd
On Ubuntu, apt may reinstall snapd as a dependency of other packages (e.g. gnome-software). Pin it to prevent that:
cat <<'EOF' | sudo tee /etc/apt/preferences.d/no-snapd
Package: snapd
Pin: release a=*
Pin-Priority: -1
EOF
Remove snapd on Fedora / RHEL / Rocky
sudo systemctl disable --now snapd snapd.socket
sudo dnf remove snapd
sudo rm -rf /var/lib/snapd
Remove snapd on Arch
sudo systemctl disable --now snapd snapd.socket
sudo pacman -Rs snapd
Troubleshooting
Snap command not found after install
The /snap/bin directory may not be in your PATH yet. Log out and back in, or source your profile:
source /etc/profile.d/snapd.sh
Snap takes a long time to launch
First launch mounts the squashfs image — subsequent launches are faster. If slowness persists, check whether the snap is running on a mechanical disk; snaps on HDDs mount noticeably slower than on SSDs. Also confirm AppArmor is loaded:
sudo aa-status | grep snap
Classic snaps fail on Fedora with "mount namespace" errors
Ensure the symlink exists and that you have rebooted after creating it. SELinux can also block classic snaps on Fedora; check sudo ausearch -m avc -ts recent for denials and consider the snapd SELinux policy package:
sudo dnf install snapd-selinux
Disk space growing in /var/lib/snapd/snaps
Each snap revision is a separate squashfs file. Use snap list --all to see old revisions and remove them individually, or set the retention count:
sudo snap set system refresh.retain=2Frequently asked questions
- Is snap safe to use? Snaps run in a sandbox, but classic snaps don't — how do I know what I'm installing?
- Strict snaps are sandboxed via AppArmor and seccomp. Classic snaps have full host access, so stick to well-known publishers (Canonical, JetBrains, Microsoft, etc.) for those. Always run 'snap info <name>' to check the publisher and confinement type first.
- Why does my snap application update itself without asking me?
- Snapd refreshes snaps automatically four times per day by default. You can restrict this to a specific time window using 'sudo snap set system refresh.timer' or hold individual snaps with 'sudo snap refresh --hold'.
- What is the difference between a snap channel track and risk level?
- A track targets a major version line (e.g. '20' for Node.js 20), while the risk level — stable, candidate, beta, or edge — reflects how tested that release is. Most users want 'latest/stable'.
- Can I install the same application from both snap and apt?
- Yes, but they are independent installations that may conflict in the application menu or share config files unexpectedly. It is usually cleaner to pick one source and stick with it per application.
- Why does /var/lib/snapd/snaps keep growing?
- Snapd retains the last two revisions of each snap by default to enable rollback. Remove old revisions manually with 'sudo snap remove <name> --revision=<number>' or set 'sudo snap set system refresh.retain=2' to cap retention.
Related guides
Linux Clipboards Explained (+ Clipboard Managers)
Learn the difference between Linux's PRIMARY and CLIPBOARD selections, use xclip, xsel, and wl-clipboard from the terminal, and manage history with GPaste or Klipper.
Configure LibreOffice for Daily Use
Configure LibreOffice for daily use: set default save formats for MS Office interop, tune autosave, install fonts, and add productivity extensions.
Configure the Touchpad and Multitouch Gestures
Configure Linux touchpad behavior and multitouch gestures using libinput, libinput-gestures, and native GNOME and KDE Plasma settings on both Wayland and X11.
Wayland vs X11: How to Choose and Configure Each
Know when to run Wayland or X11, how to check your current session, switch at login with GDM/SDDM/LightDM, and handle NVIDIA and XWayland edge cases.