🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

snap Command

Beginner Package Management man(1)

Install and manage snap packages

👁 10 views 📅 Updated: Mar 15, 2026
SYNTAX
snap [OPTION]... COMMAND [SNAP]

What Does snap Do?

snap installs and manages snap packages — self-contained application bundles that include all dependencies. Snaps update automatically, run in sandboxes, and work across many Linux distributions.

Snaps are designed for cross-distribution compatibility. A single snap works on Ubuntu, Fedora, Debian, Arch, and more. They include all libraries and dependencies, avoiding "dependency hell".

snap is maintained by Canonical and is the default on Ubuntu for many applications. Snaps auto-update in the background and provide automatic rollback if updates fail.

Options & Flags

OptionDescriptionExample
install Install a snap sudo snap install firefox
remove Remove a snap sudo snap remove firefox
list List installed snaps snap list
find Search for snaps snap find "text editor"
refresh Update snaps sudo snap refresh
info Show snap details snap info firefox
--classic Install with classic confinement (no sandbox) sudo snap install code --classic

Practical Examples

#1 Install snap

Installs VS Code with classic confinement (full filesystem access).
$ sudo snap install code --classic

#2 List installed

Shows all installed snaps with versions.
$ snap list
Output: Name Version Rev Tracking\nfirefox 120.0 3432 latest/stable

#3 Search snaps

Searches the Snap Store for Node.js related snaps.
$ snap find node

#4 Update all snaps

Updates all snaps to latest versions.
$ sudo snap refresh

#5 Remove snap

Removes the snap and its data.
$ sudo snap remove firefox

#6 Revert update

Rolls back to the previous version.
$ sudo snap revert firefox

Tips & Best Practices

Classic vs strict: Strict snaps run in a sandbox (limited filesystem access). Classic snaps (--classic) have full access. IDEs and dev tools often need --classic.
Auto-updates: Snaps update automatically. Use snap refresh --hold to pause updates. snap refresh --unhold to resume.
Startup can be slower: Snaps may start slower than native packages because they mount a squashfs filesystem. This is a known trade-off.

Frequently Asked Questions

What is a snap package?
A self-contained application bundle with all dependencies included. Works across distributions and updates automatically.
How is snap different from apt?
apt installs distribution packages that share libraries. snap installs self-contained bundles. snap is cross-distribution; apt is Debian/Ubuntu only.
How do I roll back a snap update?
sudo snap revert snap_name reverts to the previous version.

Master Linux with Professional eBooks

Curated IT eBooks covering Linux, DevOps, Cloud, and more

Browse Books →