How to Use a Snap Package in Ubuntu – 7 Tips

snap-package

What is a snap package? You will often need to install different programs for various purposes when using Ubuntu. When installing some applications, you might run into dependency issues. To address the dependency errors faced when installing applications, Canonical developed snaps.

The snaps are programs packaged with all dependencies, making installing and running them on various Linux distros easy. The snap package manager easily automates the installation, finding, upgrading, and removal of programs.

This post sheds light on snap packages. We will understand what it takes to use snap packages, including installation, upgrading, listing installed programs, removing a program, etc. You will have a comprehensive understanding of the Ubuntu snap package. Read on!

Getting Started with Snap Packages

Before we cover how to work with Snap programs, let’s briefly understand how the Snap ecosystem works. Five things make up the snap ecosystem.

1. Snapd – It is the snap daemon that must be installed for you to use the snap command-line utility.

2. Snap – It is the command-line utility used to install, list, find, and remove snaps.

3. Channels – The snaps are monitored by channels, which determine the available release for a snap and fetch any available updates.

4. Snapcraft – It is a framework tool used by developers to build snaps.

5. Snap Store – Once a developer creates a snap, they publish it in the snap store where users can source and install it.

Now that we have this understanding, we are ready to dig deeper and understand how to work with the snap package on Ubuntu.

Read Also: Snap vs APT - What is the difference?

How to Use Snap Package

You can only install snap packages once the snap daemon is installed on your system. Run the command below to install snapd to manage all the snaps you will install.

install-snapd

1. How to Search for a Snap Package

Sometimes, you may want to locate a snap to see its essential details. Whether you know its exact name or not, you can type a name, and the result will display the matching content and some information on the snap package.

For instance, we can try finding ‘vlc’ using the below command.

The search results will display all matching content and give basic information about the snap, such as the version.

snap-package-find-vlc

2. How to Get Information on a Snap Package

When you know the name of a particular snap, you can query its information. Using ‘vlc’ as our example, we can run the below command to get its information.

You will get a result like the one below.

snap-info

3. Installing Snaps

We’ve discussed what snaps are and given an overview of how to find a snap and query its information. The next step is to install a snap package.

To install a package, run the snap install command below and add the snap’s name.

We’ve used ‘vlc’ as an example. You will get a progress bar showing the installation process until it is completed. You can also read our guide on other ways of installing VLC on Ubuntu.

snap-install-package

4. View Installed Packages

Viewing all the installed snaps on your system using the below command is possible.

You will get an output showing a summary of all the apps and some of their details, such as the version.

snap-list-installed-packages

Instead of listing all the installed snaps, you can list a specific application to get its summarized information. Use the syntax below.

snap-list-firefox

5. How to Refresh and Revert Updating Snap Packages

When referencing Snapd, its updates are called refresh. Although Snapd automatically refreshes the packages, you can refresh all or a specific package.

To refresh all packages, use the command below.

snap-refresh-packages

If you target a specific snap, run the below command.

snap-refresh-firefox

If the new version doesn’t work well, you can revert the update to use the previous version. Use the revert command below.

6. Check Snap Changes

Another helpful feature with Snap is that you can view a history of all the changes you’ve made. To display this list, run the below command.

snap-review-changes

7. How to Remove Snap Packages

You can quickly remove a snap package from your system using the below command.

The command will also remove all previous versions of the specified snap.

snap-remove-package

Conclusion

Understanding the snap packages will make installing and managing programs easy for any Linux user. This post discusses what snaps are. Still, we’ve learned how to install them, list installed snaps, find a snap, remove snaps, etc. Hopefully, the article has shared the needed insights to help you get comfortable using snap packages.

Found this helpful? - Share it!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top