An introduction to Ubuntu’s Snap packages

What is a Snap package?

As you may already know, Ubuntu 16.04 LTS have introduced Snap packages. Snap packages are entirely different than Deb packages. Usually, the deb packages are the archive of files. When you install a deb package, the files will be placed on various system directories. Also, some dependencies will be installed along with deb packages to function properly. But, Snaps are different. Unlike Deb packages, A Snap package will be installed to its own directory, and they are completely isolated from the rest of the system. So, they doesn’t mess up with other operating system files. Each Snap package is bundled with its own set of libraries and dependencies, so it doesn’t depend on any other packages, dependencies, or libraries. These packages have extension .snap, and it can be installed alongside debs. Again, it doesn’t mess up with other deb packages either.

Ubuntu snap packages

The good news, according to Canonical, is the developers of other Linux distributions and applications are started to contribute to Snap packing format. So, Snaps are not just for Ubuntu operating system, but also Snaps now work natively on Arch, Debian, Fedora, Kubuntu, Lubuntu, Ubuntu GNOME, Ubuntu Kylin, Ubuntu MATE, Ubuntu Unity, and Xubuntu. They are currently being tested on CentOS, Elementary, Gentoo, Mint, OpenSUSE, OpenWrt and RHEL, and are easy to enable on other Linux distributions. To put simply, Snap is a single binary package that can be installed easily and securely on any Linux desktops, servers, IoT devices, and Cloud.

Why Snap packages are better?

One of the big advantage of using Snap packages is the developer can give the updated applications to all Linux distributions at once. Say for example, the Arch Linux and other rolling release distros users might get the latest updated VLC package once it is officially released by the developers, whereas stable release distribution users have to wait sometime to get the same software version. The stable distros users can only use the same version of VLC after it’s pushed by the developers to the PPAs or distribution’s repositories. But in this case, using Snap packages, You don’t need to rely on software PPAs, distribution’s repositories. It doesn’t matter which distribution you use, you will get the updated packages immediately after they are released.

Nick Nguyen, Vice President of Product, Firefox at Mozilla says about Snaps,

“We strive to offer users a great experience and make Firefox available across many platforms, devices and operating systems. With the introduction of snaps, continually optimizing Firefox will become possible, providing Linux users the most up-to-date features,”.

There are some disadvantages too

Snap packages are good so far, but there is some issues too. The major issue is the size. For example, the typical size of LibreOffice Deb package is 200-300MB approximately, but the LibreOffcie Snap package size is around 1GB, which is four times bigger than the normal DEB. The reason is obvious, isn’t it? Because every Snap packages are bundled with all required libraries and dependencies. That’s why these package’s size is too big. We hope that Snap apps developers might find a way to reduce the the size of Snap packages in the days to come. So, Snaps packages will consume more disk space than traditional Deb packages.

Where do I get the Snap packages?

As of writing this guide, There are 250+ Snap apps are available. Some of the popular Snap packages available at present are:

Be mindful that, the Snaps are still in earlier stage. Some apps might not work. Use them on your own risk.

How do I create my own Snap package?

Creating Snap packages are easy. The Canonical developers have developed a tool called Snapcraft which is used to create your own Snap packages. You can create Snaps either from the source or existing packages. Using Snapcraft not only you can create Snaps, but also you can publish it to the Ubuntu Snappy store, so that other users can use and benefit from your Snaps.

For more details about creating a Snap package, check the following link.