Skip to content

The future of app distribution in Linux: Snaps and Flatpak

Past year I heard lots about Snaps and Flatpak and finally decided to study it in details.
I was amazed how easy and flexible they are.

Both flatpak and snap aim for cross-distro app distribution but the order of their feature development differs based on their own priorities.

There was a time when you typed sudo apt-get install [package] (or yumpacmandnf, etc.) in your terminal, then, a list of dependencies of that package were shown and you were prompted if the installation should proceed. But that doesn’t mean that command line installation will disappear or these cross-distro apps will merge them. No, they are made for time saving in most and for the new linux-users due to their flexibility.

But now, and innovative revolution has risen: cross-distribution applications. This time, I will make a comparison of three major formats: Flatpak and Snaps.

Snap

Snap is a distribution independent package format created by Canonical for Ubuntu, with a first release in 2014. Since then, other major distributions like Arch, Gentoo and Fedora have also integrated support for the Snap framework.

The online app store Snapcraft can be used to find and install Snap packages. This centralized app store can be seen as both an advantage and disadvantage for Snap packages. It is great that a user has a single location where he can find all available Snap packages, but this app store is controlled and maintained solely by Canonical.

On Snapcraft, developers can also find guides to help them with publishing their software as Snap packages. Both open and proprietary software can be published on the Snapcraft app store.

Besides Linux, Snap packages are also targeted towards IoT (internet of things) and embedded devices running Ubuntu Core, a minimalistic version of Ubuntu.

Based on the count provided by uappexplorer there are currently 1804 Snap packages available.

Flatpak

The Flatpak package format is developed as an independent open-source project, with a first release in 2015. The main contributor to the Flatpak project is Fedora, but the Flatpak framework is also supported by most major Linux distributions. You can find the Flatpak source code on Github.

The Flathub website can be used to find and install Flatpak packages. Although the Flatpak package format has no restrictions regarding open-source or proprietary software, the Flathub app store initially only allowed open-source software to be published on their website. Recently some proprietary software has made it into the app store as well.

In contrast to Snap’s single repository controlled by Canonical, Flatpak does allow you to use multiple repositories to install and update Flatpak packages from.

For general information on the Flatpak framework and for guides on how to publish Flatpak packages, refer to the Flatpak documentation.

One major disadvantage of Flatpak is that it does not have server support, unlike Snap and AppImage. It is reliant on certain desktop session services that are not available on most Linux servers.

On Flathub there are currently 418 Flatpak packages available, but because Flatpak does not have a single repository that contains all packages, the total amount of available Flatpak packages is likely higher.

In the next posts I will describe installation and managing process of both Snap and Flatpak

 

Published inLinuxSecurity