Install or Upgrade Snap Packages in Linux
Table of contents
Hello there, If you are a Linux user, especially an Ubuntu user, then I think you are familiar with snap packages already.
First, To install or Upgrade snap packages, let's check if snapd
is installed or Not.
snap --version
If not, we can use the below commands to install the snap package manager:
sudo apt update
sudo apt install snapd
NOTE: I am using Ubuntu 20.04 to install the snap package manager. For all major Linux distributions, follow this link SnapCraft Link.
INSTALL THE SNAP PACKAGES:
To find a package to install from the Snap app store, follow this link SnapCraft App Store. Here you will get all available apps on the snap store.
The below command is used to install the package.
sudo snap install package_name
NOTE: Don't forget to replace the package_name
with the package you want to install.
UPGRADE THE SNAP PACKAGES
By default, the snap package manager upgrades all the packages which are installed using it. But if you want, we can upgrade it manually too.
To list packages installed through the Snap package manager, paste the below command into the terminal.
snap list
To get the list of packages that need to upgrade, use the below command
sudo snap refresh --list
To upgrade all the packages, the below command upgrades all the packages which have newly updated versions available.
sudo snap refresh
To upgrade a specific package.
sudo snap refresh package_name
NOTE: Don't forget to replace the package_name
with the package you want to upgrade.
NOTE: To update one or more Snap packages, you need to close all the currently open windows of that respective packages. Otherwise snap will not update that package even if there is any update present for the respective package.
Thank you for reading the post. I hope you find out this post useful.
Subscribe to my newsletter
Read articles from Hrishikesh Salunkhe directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Hrishikesh Salunkhe
Hrishikesh Salunkhe
Open to learn new technology| Computer Engineer