Snaps, Flatpaks, AppImage which one is ahead?
Posted on Sun 13 January 2019 in Linux
On the Linux desktop there is a push for a universal packaging format. Currently there are three main contenders: Snaps packages, promoted by Canonical and Ubuntu; Flatpak, promoted by the Gnome Foundation although not a Gnome project; and AppImage, a community-led project. Even though the three packaging formats differ technically they share some goals:
- Distribution agnostic packaging: The packages are meant to run on any Linux distribution (Ubuntu, Debian, Fedora, OpenSUSE, ArchLinux, ...). For developers this means they can package once and run the software anywhere. This is usually achieved by bundling most (sometimes all) software dependencies into a single package. Snap and FlatPaks do, however support some shared runtimes.
- Upstream packaging: The packages are meant to come directly from the developers of the project instead of having a maintainers for each software for each distribution. With upstream packaging it is possible to get the latest version of the software as the developers intended.
I will not comment on whether universal packaging is good or not. I am interested in knowing which packaging format is "winning". According to many blogs and social media posts on the internet Snaps is way ahead of Flatpaks or AppImages. Frequently people will claim there are thousands of Snaps but Flatpaks and AppImages are merely in the hundreds.
To be more precise, Canonical states there are 4100 snap packages currently available. Whereas according to FlatHub there are 480 FlatPaks. Finally, according to AppImageHug there are 634 AppImages. Many websites on the internet cite these statistics (albeit slightly now out of date). For instance, see Verummeum.
Snap packages | FlatPaks | AppImages |
---|---|---|
< 4100 snaps | 480 flatpaks | 634 appimages |
Is this true? Is the Snap package format ahead of Flatpak and AppImage? The numbers may be correct but the conclusion that Snaps are ahead is not. Relying on those numbers to claim Snaps are taking over is misleading. We aren't comparing apple to apples. The number of packages for each format is counted differently.
Furthermore having more packages doesn't necessarily mean having the best software selection available. The numbers alone tell us nothing about the kind of software distributed as Snaps, FlatPaks or AppImages.
So how popular is each? Well, to answer this question let's dive in an analysis of each format and the software selection available.
Comparing Snap, Flatpak and AppImage
Snaps are not distributed in the same way Flatpaks are, and AppImage's distribution method differs even more so. Snaps are only available to the general public in one store. Meanwhile Flatpaks are distributed in many different stores, FlatHub being one of those stores but the soul one. AppImage are not even distributed in a store. AppImageHub is merely an attempt to list all applications currently available as AppImages. It goes without saying the number of AppImage and Flatpaks could easily be significantly underestimated.
Bear in mind there is another difference which should be taken into account before comparing the numbers given above. AppImages are intended as a packaging format for end-user applications on the Desktop and the Server, but not for system level components like the Gnome Desktop or systemd. Meanwhile Flatpaks are intended mainly for the Desktop and can offer some system level runtimes like the Gnome Desktop, however, Flatpaks are not used to distribute server applications. Finally Snaps have the broader scope, being intended for Server and the Desktop; and for both system and end-user software. Naturally one should expect a higher number of Snaps packages.
However most end-user Linux applications should be distributable as Snaps, Flatpaks or AppImages. By comparing the type of software being distributed as each, we will get a better picture of how successful each of these formats are.
Differences in software selection
By searching the stores and hubs, one can reveal a lot about each format and their success.
Snap store
First I search the Snap store. But because the search engine is a bit limited I also relied on the alternative uAppExplorer. However it is hard to tell how well the two match because uAppExplorer claims there are 2007 applications while Canonical claim there are 4100 applications as snaps. Regardless here is what I found:
- A huge number of Snaps are distributed for non-Intel/AMD architecture. For instance, for ARM there are 1176 out of 2007 packages (58.6%). Similarly we have 244 out of 2007 for IBM's System Z aka s390x (12.2%); and 273 out of 2007 for PowerPC (13.6%). In total this gives us 84.3% that are not distributed on Intel/AMD architecture. Not exactly the typical architectures used by a typical Linux desktop user. This has implications when considering the success of Snap. On one hand Snap is cross platform and widely available, which is a plus compared to Flatpak and AppImage. On the other hand this put the number 4100 (or 2007 according to uAppExplorer) into perspective because FlatHub and AppImageHub do not differentiate between architectures. When comparing Intel/AMD applications, we get about 600 Snaps against 480 Flatpaks and 634 AppImages (which put AppImage in the lead).
- There is a huge number of Playground applications on Snapcraft.io, who serve no end-user purpose. Those applications are a result of developers learning about Snaps. Let me give some examples. If one searches on Snap store the keyword Hello one finds nearly 300 "Hello" applications. Alternatively, if one searches for Test one finds at least 100 "Test" applications. There might be more applications on that kind. However this means that by a conservative estimate about 10% of Snaps aren't real end user applications. This means that Snaps are popular with developers as they are trying them out (Flatpak or AppImage could easily be just as popular we just don't know) but the number of proper Snaps packages is closer to 550.
- If one adds up the software made available on the Snap store in the different suggested sections (namely Dev, Games, Social, Crypto, Video, Music, Productivity, Utilities, Graphics and Server), I found there are about 400 end-user applications, putting Snap behind both FlatPak and AppImage. However probably many applications fit in none of the offered categories which would mean 400 underestimates the number of end-user applications packaged as snaps.
- Duplicates applications are present in the store. For instance, Stellarium, Brackets, rsync and tmux are duplicated. Unfortunately I have no easy way to count the number of duplicates present, but they do not appear to be frequent.
- Snaps are used to distribute system level components. The runtimes for Gnome, KDE Plasma are distributed as Snaps, so are Docker, the Linux kernel, MySQL, and many more. This is quite unique for Snaps although some runtimes are distributed through Flatpak. Whether this is a gauge of success or not of Snaps as a packaging format is a matter of opinion. But at least it provides flexibility for developers and hence in principle fewer barriers preventing adoption of the Snap packaging format.
- Snaps are quite successful with big corporations like Microsoft or Jetbrains officially adopting Snaps as their preferred distribution method.
Depending on how one counts an application there could be as high as 4100 snap packages or as low as 400. I think when compared with Flatpak or AppImage we should count around 600 snaps.
FlatHub
There is less to say about FlatHub:
- FlatHub does not provide information about the architecture. However each application is counted once even if it supports multiple architectures. There are numerous ARM and Intel/AMD applications but I did not find any PowerPC applications or System Z applications using FlatHub's GitHub page. I do not have a good way to count the number of ARM and Intel/AMD Flatpaks, but it is sound to assume there are more Intel/AMD applications than ARM applications. Flatpak isn't as successful as Snap when it comes to cross-platform support, but it shouldn't be a surprise as Flatpak is more desktop oriented and PowerPC and System Z aren't exactly typical Linux desktop architectures.
- I did not find any "Hello" application and only found 4 "Test" applications. Overall FlatHub appears to be curated meaning all or nearly all software on FlatHub is legitimate end-user applications.
- When, summing up, the number of software available in each category I found at the time 527, which is slightly higher than the claimed at the time number of applications 479 (meaning some software is in multiple categories). It is worthy to note there are 132 games against 60 on Snapcraft and 40 on AppImageHub. Flatpak appears to be quite successful with games.
AppImageHub
Similarly there is less to say about AppImageHub
- Concerning architecture support AppImages are known to work on Intel/AMD and ARM. In some cases one needs to compile the AppImage tooling. One example of an application available on 32-bit Intel, 64-bit AMD and ARM is MuseScore. I found no cases of AppImage running on PowerPC or System Z.
- Again like with FlatHub I found no "Hello" and no "Test" on AppImageHub.
- The software catalog on AppImageHub is very different from Snapcraft or FlatHub. It appears that AppImage is quite successful with QT/KDE application and Electron applications.
The problem with AppImageHub is that it is an effort to list the AppImages in the wild. It goes without saying that there many applications which are not on the list (for instance OpenRA and everDO). The number of AppImage could be way bigger, meaning AppImage being way ahead of Snaps and FlatPak.
Measuring success with existing popular applications
Instead of comparing the number of applications distributed as Snaps, FlatPaks or AppImage as a measure of success, let's see how many existing Linux software has moved to Snap, FlatPak or AppImage. It should give us an idea of how successful these new packaging formats are with old open source projects.
Disclaimer: Now I must be honest, answering this question is difficult and easily subjective. I tried being impartial and accurate but you should take everything I state with a grain of salt. Try researching on your own.
Because counting on my own whether each piece of software on Linux is or not available as a Snaps, as a FlatPak or as an AppImage is time consuming, I decided to take a subset of populare Linux applications. To avoid putting personal bias in the list I choose the set of software listed on FossMint. I excluded Google Drive and Evernote as they are not official packaged for Linux. This should give us a rough idea of the percentage of applications moving to universal packaging.
Using this list, I searched for the following:
- Are the projects officially adopting AppImage, FlatPak or Snaps as a means of distribution? In each case I checked the project's official website.
- Is the software distributed either as AppImage, FlatPak or Snaps? Regardless whether the project official supports any of the format.
- When distributed as an AppImage, FlatPak or Snaps, is the latest version being shipped?
Using the list, I obtained the following statistics:
- About 14% of projects official distribute their software either as AppImage, FlatPak or Snaps. Meaning that adoption is slow (the youngest of the three is 4 years old). Of the 14% ~ 10 of applications which moved to universal packaging, 40% ~ 4 have adopted FlatPak, 40% ~ 4 have adopted AppImage and 20% ~ 2 have adopted Snaps. However because the sample of applications officially distributed AppImages, FlatPaks and Snaps are so small, one should not conclude yet that FlatPak or AppImage is being more successful.
- Concerning whether software is being made available as Snaps, Flatpaks or AppImage, AppImage appears to be last with about 37%. Snaps and FlatPak are ahead with respectively about 46% and 47% adoption rate. This discrepancy can be explained by the AppImage project's insistence on upstream packaging.`. Overall this means Snaps and FlatPaks are being more successful but only because volunteers (not officially associated with open source software projects) package popular Linux software as Snaps and FlatPaks.
- Concerning whether we have the latest version packaged as either format we see a big lead for Snaps. About 60% of Snaps provided ship the latest version, 53% of FlatPaks provided ship the latest version and only 37.5% of AppImages ship the latest version. AppImage has such a low number because most AppImages have been created by probonopd one of the main developers behind the AppImage project, and he has not been updating them for more than a year. The numbers are healthier for Snaps and FlatPak but it is still far from 100%. Many volunteers who originally packaged software as Snaps, Flatpaks or AppImages have stopped updating the software meaning a lot of the software is out of date.
Based on this list I don't think one can claim Snaps is way ahead if anything it appears to be strongly in competition with FlatPak. One should not conclude AppImage is losing steam either, AppImage is doing well with 634 applications distributed as AppImage according to AppImageHub and many developers choosing AppImage as the official format for Linux. It is striking that a lot of software is distributed today as Snaps, as Flatpaks and as AppImage by enthusiasts, and not because projects are officially adopting either formats. This means will still need to rely on maintainers to distribute and maintain software as Snaps, Flatpak or AppImage.
What holding back either Snaps, FlatPak or AppImage?
What stops developers from using Snaps, FlatPaks or AppImages? I searched various forums and GitHub for answers. Here are some of the main reasons:
- Lack of time, resources or motivition: This is one of the main reasons for not seeing a package format being adopted. See for instance the following links 1, 2, 3, 4, ... . This should not be surprising because most software is developed by hobbyists and they don't necessarily have the time to learn/build for a new packaging format.
- Not even packaged: I was surprised to see lots of software projects not even packaging on Linux to begin with (for instance rsync and tmux). These projects just assume maintainers will package
- Software no longer developed: Lots of software are no longer being developed. For instance, Frozen Bubble was last updated in 2010 whilst Banshee was last updated in 2014. It is hard to expect projects with no developers to magically create a Snaps, FlatPaks or AppImages.
- Lack of agreement over which format to use: This is not frequent but fairly telling. If Snaps, FlatPak or AppImage are supposed to be the Universal Package Format how come we have 3 of them. RStudio could not agree over which format to use.
Lots of people in the Linux community criticise Snaps, FlatPak and AppImage on technical ground and disagree with the philosophy of universal packaging, but ironically this didn't show up much as a reason not to support Snaps, FlatPak or AppImage. I think the people complaining about universal packaging are usually not the software developers, I think criticism comes more from system administrators, Linux distribution developers/maintainers and users who choose Linux for its security.
Conclusion
At first it seems Snaps are the clear winner but the number 4100 is generous. It counts many applications people won't install and it seems to count Snaps for different architecture separately. A fairer comparison would put all three on par. Overall traditional Linux software appears reluctant to adopt Snap/Flatpak/AppImage.