How to Install and Update Software Using Snap on Ubuntu
Introduction
Snap is a software package management system that makes it easy to install and update software on Lininux. In this guide, we will cover how to install Snap, how to install software with Snap, how to check which software is installed with Snap, how to update software with Snap, and how to remove software installed with Snap.
NOTE: This guide is based on Ubuntu. Other Linux flavors works the same way, for example if you are using CentOS, simply use yum or dnf instead of apt at the installation phase.
Installing Snap
Before you can install and manage software with Snap on your Ubuntu machine, you need to install Snap. To do this, follow these simple steps:
- Open the terminal on your Ubuntu machine by pressing “Ctrl + Alt + T” or searching for “Terminal” in the applications menu.
- Run the following command to install Snap:
- Enter your password when prompted to do so.
- Wait for the installation to complete.
- Once the installation is complete, you can start using Snap to manage software on your Ubuntu machine.
sudo apt update
sudo apt -y install snapd
Installing software with Snap
To install software with Snap on your Ubuntu machine, follow these steps:
- Open the terminal on your Ubuntu machine by pressing “Ctrl + Alt + T” or searching for “Terminal” in the applications menu.
- Run the following command to search for available Snap packages:
- Look through the list of available packages and find the one you want to install.
- Run the following command to install the package:
- Wait for the installation to complete. Snap will automatically download and install the latest version of the package.
- Once the installation is complete, you can launch the installed software as usual.
snap find <package_name>
Replace <package_name> with the name of the software you want to install. For example, to search for the Firefox browser, you would use the following command:
snap find firefox
sudo snap install <package_name>
Replace <package_name> with the name of the package you want to install. For example, to install the Firefox browser, you would use the following command:
sudo snap install firefox
Checking which software is installed with Snap
Before updating or removing software installed with Snap, it is important to check which software is installed with Snap on your Ubuntu machine. To do this, follow these steps:
- Open the terminal on your Ubuntu machine by pressing “Ctrl + Alt + T” or searching for “Terminal” in the applications menu.
- Run the following command to list all installed Snap packages:
- The list of installed Snap packages will be displayed in the terminal.
The output will show you a list of all Snap packages installed on your system, including the package name, version number, and release channel.
For example:
Name Version Rev Tracking Publisher Notes core 16-2.51.7 11606 latest/stable canonical✓ core firefox 91.0.2-1 662 latest/stable mozilla✓ -
In this example, two Snap packages are installed: core and firefox.
snap list
Alternatively, you can run the following command to list only the installed Snap packages that have available updates:
snap list --all --outdated
This will display a list of all installed Snap packages that have updates available.
Updating software with Snap
Updating software installed with Snap is a simple process. Follow these steps:
- Open the terminal on your Ubuntu machine by pressing “Ctrl + Alt + T” or searching for “Terminal” in the applications menu.
- Run the following command to update all Snap packages installed on your system:
- Alternatively, you can update a specific Snap package by running the following command:
- The Snap package(s) will be updated to the latest version available on the Snap store.
snap refresh
snap refresh package-name
e.g
snap refresh firefox
After updating a Snap package, you can check the version number to confirm that the update was successful. To do this, you can run the following command:
snap info package-name
e.g
snap info firefox
Replace package-name with the name of the package you want to check the version number for.
Updating software on Ubuntu using Snap is a simple and convenient process. Snap provides a user-friendly way to install, update, and manage software packages on Ubuntu. With the commands provided in this guide, you can easily update your Snap packages to the latest version available on the Snap store. Keep your system up-to-date to ensure you have access to the latest features and bug fixes for your favorite software packages.