Historically, installing software on Ubuntu required using the apt package manager. While highly efficient, apt installs software system-wide, meaning that upgrading one application could sometimes break shared dependencies required by another. To solve this, Canonical (the company behind Ubuntu) developed Snap.
Snap is a modern software deployment system. A “snap” is an application packaged with all of its dependencies bundled directly inside it. It runs in an isolated, sandboxed environment, ensuring that it cannot interfere with the rest of your operating system. Today, Snap is the default and preferred method for installing many popular applications on Ubuntu, including Firefox and Chromium.
How to Search for Snap Packages
Before installing software, you need to find its exact package name in the Snap Store.
Open your terminal and use the find command followed by a keyword:
snap find vlc
This command searches the official Snap Store and returns a list of matching packages. The output will include the package name, the version currently available, the publisher (which helps verify authenticity), and a brief description.
For example, you might see vlc listed as the official package published by VideoLAN.
How to Install a Snap Package
Once you know the exact name of the package, installing it requires administrative privileges. Use the install command:
sudo snap install vlc
The terminal will display a progress bar as it downloads the bundled application and mounts it to your filesystem. Because snaps include all their dependencies, the download size is typically larger than a traditional apt package, but the installation process is far less likely to fail due to missing libraries.
Installing “Classic” Snaps
By design, snap packages are strictly confined. They cannot access your system files, network configuration, or hardware directly without explicit permission. However, some applications—like code editors (e.g., VS Code) or development tools (e.g., Node.js)—require full access to your filesystem to function correctly.
These applications are packaged as “classic” snaps. To install them, you must explicitly acknowledge that you are bypassing the strict security sandbox by appending the --classic flag:
sudo snap install code --classic
How to List Installed Snaps
To see all the snap packages currently installed on your Ubuntu machine, use the list command:
snap list
This provides a clean overview of your installed software, including the version numbers and whether they are strictly confined or running in classic mode. You will also notice core system components (like core20 or snapd) in this list; do not remove these, as they are required for the snap ecosystem to function.
How to Update Snap Packages
One of the primary benefits of the Snap ecosystem is that updates happen automatically in the background. You generally do not need to worry about keeping your software up to date.
However, if you know a new feature has just been released and you want to force an update immediately, you can tell the system to refresh your packages:
sudo snap refresh
If you want to update only one specific application, append its name:
sudo snap refresh vlc
How to Remove a Snap Package
Uninstalling a snap package is entirely clean. Because the application was sandboxed, removing it guarantees that no leftover configuration files or orphaned dependencies will clutter your system.
To remove an application, use the remove command:
sudo snap remove vlc
Snap will unmount the package, delete the bundled files, and restore your system to its previous state. By mastering these basic commands, you can take full advantage of Ubuntu’s most robust and secure software management tool.