Ubuntu uses two primary methods for installing applications: the traditional APT package manager and the newer Snap package system. While APT downloads software from curated Ubuntu repositories, Snap packages are self-contained bundles that include the application and all its dependencies in a single file. This design means Snap applications work consistently across different Ubuntu versions and can be updated independently of the base system.
What Makes Snap Different From APT
Understanding the practical differences between Snap and APT helps you decide when to use each:
- Dependency isolation. A Snap package bundles its own libraries, so it will not conflict with system libraries or other applications. APT packages share system libraries, which occasionally causes dependency conflicts during upgrades.
- Automatic updates. Snap packages update automatically in the background. APT packages only update when you run
sudo apt update && sudo apt upgrade. - Sandboxing. Snap applications run inside a security sandbox with restricted access to system resources. You can control which permissions (called interfaces) each Snap is allowed to use.
- Cross-distribution compatibility. A Snap built for Ubuntu also works on Fedora, Arch, and other Linux distributions that support snapd.
- Larger file size. Because each Snap bundles its own dependencies, Snap packages are typically larger than their APT equivalents.
- Slightly slower startup. The sandboxing and mounting mechanism can make Snap applications take a few extra seconds to launch compared to native APT packages, particularly on the first run after a reboot.
Checking Whether snapd Is Installed
On recent Ubuntu versions (20.04 and later), the Snap daemon (snapd) is pre-installed. To verify that it is running:
snap version
This displays the installed Snap version, the snapd daemon version, and your kernel version. If the command is not recognised, install snapd with:
sudo apt update
sudo apt install snapd
Searching for Available Snap Packages
To find a Snap package by name or keyword, use the snap find command:
snap find "video editor"
This queries the Snap Store and returns a list of matching applications along with their publisher, version, and a short description. You can also browse the Snap Store at snapcraft.io/store for a visual catalogue.
Installing a Snap Package
To install a Snap application, use:
sudo snap install package-name
For example, to install the VLC media player as a Snap:
sudo snap install vlc
Some applications are published in different channels (stable, candidate, beta, edge). By default, Snap installs from the stable channel. To install from a different channel:
sudo snap install package-name --channel=beta
Certain packages require the --classic flag because they need broader system access than the standard sandbox allows:
sudo snap install code --classic
Applications like Visual Studio Code, Slack, and some development tools use classic confinement.
Listing Installed Snap Packages
To see all Snap packages currently installed on your system:
snap list
This displays the package name, version, revision number, tracking channel, publisher, and any additional notes (such as whether the package uses classic confinement).
Updating Snap Packages
Snap packages update automatically by default. The snapd daemon checks for updates four times per day and applies them in the background. To manually trigger an update for a specific package:
sudo snap refresh package-name
To update all installed Snaps at once:
sudo snap refresh
To check which Snaps have updates available without installing them:
sudo snap refresh --list
Removing a Snap Package
To uninstall a Snap application:
sudo snap remove package-name
By default, Snap saves a snapshot of the application’s data when you remove it, allowing you to restore it later. If you want to remove the package completely without saving a snapshot:
sudo snap remove --purge package-name
Rolling Back to a Previous Version
One of Snap’s most useful features is the ability to instantly revert to the previous version of an application if an update causes problems:
sudo snap revert package-name
This reverts both the application and its configuration data to the state before the last update. This is significantly faster and safer than trying to manually downgrade an APT package.
Managing Snap Permissions
Snap applications run in a sandbox and must be explicitly granted access to system resources. To view the permissions (interfaces) connected to a Snap:
snap connections package-name
To grant a specific permission:
sudo snap connect package-name:interface-name
To revoke a permission:
sudo snap disconnect package-name:interface-name
Common interfaces include camera, microphone, removable-media, home, and network. This granular control is useful for restricting applications that you do not fully trust.
Controlling Automatic Update Timing
If automatic updates disrupt your workflow, you can schedule when Snap applies updates:
sudo snap set system refresh.timer=sat,06:00-08:00
This restricts automatic updates to Saturday mornings between 6:00 and 8:00. You can use day names, time ranges, and multiple schedules separated by commas.
To temporarily hold a specific Snap at its current version for up to 90 days:
sudo snap refresh --hold=72h package-name
Viewing Snap Disk Usage
To check how much storage space your Snap packages are consuming:
du -sh /snap
Individual Snap sizes can be seen by listing the contents of the /snap directory. Old revisions that are no longer active can accumulate and consume significant disk space. To clean up old revisions:
sudo snap set system refresh.retain=2
This tells snapd to keep only the two most recent revisions of each Snap, automatically removing older ones during the next refresh cycle.
When to Choose Snap Over APT
Snap packages are the better choice when:
- You want the latest version of an application that may not yet be in the Ubuntu APT repositories.
- You need an application to work identically across multiple Linux distributions.
- You want automatic updates without manual maintenance.
- You prefer the added security of sandboxing.
- You need the ability to roll back to a previous version instantly.
APT remains the better choice for core system utilities, libraries, and applications where minimal startup time and disk usage are priorities. Both systems coexist comfortably on Ubuntu, and using a combination of APT and Snap is the recommended approach for most users.