Snap is a package manager system for applications with its dependencies. The packages are called snaps are self contained, meaning everything the app needs to run like libraries, files, programs, audio files etc. are in the package and this makes them run independently regardless of the host system. The snap file format is a SquashFS file carrying content alongside metadata to tell the system how it should be used.

Snap packages were developed to help developers create only one package for their application which will run in different systems, making snap cross platform. The snaps are secure as they are confined in sandbox to ensure they do not compromise a system. Each snap package contains a YAML file i.e  meta/snap.yaml file that holds the basic metadata for the snap. Snapd (snap daemon) is the background service that uses the snap metadata to manage and maintain the snaps in the system.

Snap Store is where the developers can publish their applications. The self-packages applications are scanned automatically for any signs of malware before upload. Users are encouraged to install snaps form verified publishers only.

Snapcraft is the framework used to by developers to package their own applications in snap format. Snapcraft supports multiple programming languages like Go and Python and runs on Linux, MacOS and Windows.

In this guide I will show you how to;

  • Install Snapd on KDE Neon/Kubuntu
  • Install snap packages on KDE Neon/Kubuntu
  • Update and Revert a snap version
  • Disable, Enable and Remove a snap

Install Snapd on KDE Neon/Kubuntu

First, update the package index by using

sudo apt update

Then use the command below to install Snapd package on KDE Neon/Kubuntu

sudo apt install snapd

The above command will install snapd

Next will be to enable the snapd systemd unit that manages the main snap communication socket. Use the following command, then type in your password to allow the procedure to happen.

sudo systemctl enable --now snapd.socket

Then consequently check if the system is active.

 sudo systemctl is-active snapd.socket
 sudo systemctl status snapd.socket
 sudo systemctl is-enabled snapd.socket

Also check it is enabled to automatically start after a system boot.

To check the snap version use the following command.

snap version

This will show you the version of snapd running and its environment.

Install Snap Packages on KDE Neon/Kubuntu

To install snaps, You should check if it is in the snap store by use of a channel which will bring more specific results. In this guide I will use vlc which is a media player, to show you the general way of installing snaps. Being that vlc is a media player I can use the following command to find it.

PS. If you are installing a different snap just interchange the snap name vlc with yours

$ snap find "media players"

#Or you can use

$ snap find  

The second command this will list all the snaps which might be a hassle.

Then I will install the snap by using

sudo snap install vlc

It will automatically download vlc packages and install it

If you do not specify the channel from which to download the snap from, It is automatically installed from the stable channel

To view the version of a snap

$ snap list vlc
#or you can use
$ snap list --all vlc

The second command will list all versions available for the snap and in our case it is only the latest version of vlc available

Updating and Reverting Snaps

To update a snap use the following command

$ sudo snap refresh vlc
#or
$ sudo snap refresh 

The first command updates only that specific snapd while the second command updates all the snaps in your local system

To revert back to a previous version of a snap use;

sudo snap revert vlc

In our case there is no previous available version for vlc hence we cannot revert.

Disabling, Enabling and Removing Snaps

To disable a snap, you use the following command.

sudo snap disable vlc

A disabled snap is not removed from the system, its files are still there.

To enable a snap;

sudo snap enable vlc

To remove a snap;

sudo snap remove vlc

Disabling the snapd requires the password just to make sure you really want to make the changes of disabling it.

And if you use the snap list you will no longer find Vlc amongst the available snaps

Remove Snapd

To remove snapd use the command

sudo apt autoremove --purge snapd

Then type in your password to allow the removal and then later type in Y to continue the process.

Conclusion

With all that, you are able to install a snap and use it in your KDE Neon/Kubuntu system. Subsequently, you are now able to install other packages that you might need.

Snaps are becoming popular in the Linux community owed to their ability to run on their own containerized sandbox so as not to interfere with the system. They also enable developers to package and distribute their programs as they come bundled up with their own dependencies.

LEAVE A REPLY

Please enter your comment!
Please enter your name here