Snap or Snappy is a package management system developed by Canonical for the Linux operating system. The packages are called snaps, and the tool for using them is snapd, which works across a range of Linux distributions. A Snap package are containerized software packages contains all the requirements in it. The snaps are easy to install packages and provides auto-update features.
You can install wide range of packages available on Snapcraft store in a single command. In this tutorial, you will learn uses of Snap packages on Linux distributions.
Snapd is a REST API daemon for managing snap packages. It also provides an snap client command line utility to intract with the sanpd deamon. Users can interact with it by using the snap client.
Most of the latest Linux operating systems are pre installed with snapd daemon application. But if your Linux machine doesn’t have snapd installed, use one the following commands to install it.
To install Snapd on Debian based systems, type:
sudo apt install snapd
To install Snapd on Redhat based systems, type:
sudo dnf install snapd
After finishing the installation, snapd daemon is up and running on your system.
Searching for Snap Packages
Snap command line utility provides you option to search for available snap packages/applications on snapcraft store. You can directly search applications on online Snapcrat store.
You can also use find sub-command followed by the package name to search. To find Snap packages, type:
sudo snap find postman
Installing Snap Packages
You can install any package available on snapcraft store with the following command. To install package type:
sudo snap install postman
Snappy also maintains the different channels for the packages installation. Which allows users to install any package stable version, beta or daily updated versions. Here is the 4 major channels available for snap packages:
- stable: Stable version of packages, recommended for the most of users or production environments.
- candidate: It provides packages with updates prior to stable deployment, or those verifying whether a specific issue has been resolved.
- beta: for users wanting to test the latest features, typically outside of a production environment.
- edge: for users wanting to closely track development.
You can use
--channel to specify the channel name to install package from It. Channel is snap concept that stands for the release of a snap.
To install beta release:
sudo snap install postman --channel=beta
To install edge release:
sudo snap install postman --channel=edge
View Installed Snap Packages
Use snap list command to view all the installed snaps on your system. To view installed packages, type:
sudo snap list
Updating Snap Packages
The Snap packages are automatically update by default. You can also update it manually using the command line. To find out the available updates for the packages, execute:
sudo snap refresh --list
Use the below command to update snap packages on your system.
sudo snap refresh
Downgrading Snap Packages
Snapd also allows to revert any package to the previously installed versions. If you accidentally updated for the package or you don’t like the upgraded package. Use the following command to revert any package:
sudo snap revert <package_name>
This will revert both the snap revision and the data associated with the application.
Removing Snap Packages
You can remove snap packages anytime, whenever you don’t’ required. Run the following command with the package name to remove from your system:
sudo snap remove <package_name>
The above command will remove all the associated user data, application and dependencies from the systems. It will also stop and remove all the associated services with that package.