Snap Packages vs. Flatpaks: The Differences and Which One You Should Use

What's the Difference Between Snap Packages and Flatpaks?

If you’ve paid any attention to the Linux community as of late, you’d think there was a packaging war going on. On one side you have Ubuntu’s Snappy packages, a technology originally just created for Ubuntu. Now, with the release of Snapd, it can be run on nearly anything.

On the other side you have Flatpaks, essentially similar in many ways to Snaps, except it is more open source and relies on individual repositories instead of one central location. This technology can also be installed on nearly anything. So, which one is better? Which one should you use? And most importantly, what are the differences? Let’s find out!

The differences between Snap packages and Flatpaks aren’t really that numerous. Snap was created in-house by Canonical – the company behind Ubuntu – and the technology is hard-coded to use the Snap package store. Some may be nervous of this, as Ubuntu has total control, and in fact in order to make a Snap package you’ll need to sign a Contributor License Agreement (something that some people are very much against).

unversal-packages-snap-store

With Flatpaks everything is open sourced and is not as centralized as Snaps. What’s more important is that Flatpaks are more focused on delivering software to desktops, and Snap packages are basically just server technology that Canonical has adopted for the desktop but works for both.

Flatpak has no centralized store to speak of. Even now, if you install it, you’re not necessarily going to be able to get stuff going that easily. The software essentially works much like the Ubuntu PPA system. You  have to go out and find a repository and then add it. This is in contrast to how Snaps work, which only come from the Canonical snappy store and nowhere else (for now).

unversal-packages-flatpak-repo-page

When you install a Snap package you are essentially getting every single piece of software component you need to run something in one entire package (if you’re confused, think of Docker containers). For example: you install a Snap that bundles the entire Gnome desktop. It’d be bundled with everything, libraries and all.

With Flatpak, everything is a little different. Take the Gnome example. The Gnome Desktop flatpak would have all of the files required but not every single library – unless the developer chose to do so. The Flatpak team created a runtime that should house everything you need.

It’s hard to say what technology will be the leader here. There is no doubt my opinion on this matter will be met by some angry comments arguing for one position over the other, so before I go any further, I’d just like to be clear. Flatpaks and Snap packages are both very interesting and unique ideas.

unversal-packages-flatpak-page

It is clear to me, right now at least, that Snap packages would be the thing to use if what you want is a “universal package format.” With Snapd available for nearly every distribution that it can build on, it’s increasingly easy to get going. What’s more important is that anyone can figure it out. You don’t need to hunt down repository urls like Flatpak. Just install and go.

unversal-packages-snap-package-logo

That isn’t to say that Flatpak isn’t worthwhile. If you’re on Fedora 24, for instance, you should take full advantage of Flatpak. You can also get it working on Arch, if you’re into that by installing this AUR package, or by building it yourself from Github.

Though Flatpak and Snappy are not new ideas, they have a lot of force behind them. We’ve had tools like AppImage (and others) in the past, and they never really got that much traction. However, I think that both Flatpak and Snappy have what it takes to make more universal installation tools on Linux take off – even if it means we have two main formats instead of one.

Some people say that too much choice on Linux is bad. We have too many distributions, too many binary package formats, too many file system choices, too many desktop environments, and the list goes on. However, I think that what some say is a weakness is also a great strength. We can hedge our bets with both Snappy and Flatpak. If one ends up being bad we can try something else, or if they’re both goo it’s a win-win situation where we all reap the benefits.

How do you feel when it comes to Snap packages versus Flatpaks? Tell us below!

9 comments

  1. If we are just comparing Snap versus FlatPak – then I vote for Snap. But looking at all the options available – I vote for AppImage.

  2. In this week’s issue of the blog DistroWatch Weekly, Jesse Smith published the results of his head to head test of Snap, Flatpack and AppImage. Makes for a very interesting reading.
    https://distrowatch.com/weekly.php?issue=20160704#opinion
    According to Jesse, Flatpack and Snap are “separate, incomplete “universal” package formats which will have limited cross-distro support.”

    Snap is a proprietary Canonical product which works only on Ubuntu and its derivative distros. The developers of other distros are neither interested in implementing Snap nor in cooperating with Canonical on its development.

    Flatpack is a proprietary Red Hat product which, according to Jesse Smith, barely work on Fedora.

    AppImage has been in existence for a few years. It offers a working alternative that is easier to use, works across platforms and offers better security. Instead of developing their own products, Canonical and Red Hat should join others in adopting and developing AppImage. Based on their track record, Canonical will never switch to AppImage because it wouldl not have exclusive control over it.

    • “Flatpack is a proprietary Red Hat product” — where did you get that information from?? :)

      Quote: “Flatpak is Free Software and is developed in the open, as a part of the Freedesktop project.”
      The number of RedHat haters online is staggering… At least, if you want to spread some FUD around, provide some facts.

      • So Flatpack is not a proprietary product. However, AFAIK, it is currently only used by RedHat. Doesn’t change the results of Jesse Smith’s comparison.

        What FUD?! Unless you are of the “If you’re not with us, you’re against us” persuasion. I have no feelings one way or the other about RedHat. As for facts, since I did not want to misstate any, I linked to Smith’s DistroWatch article. If you think there is any FUD, blame Jesse.

  3. You are wrong when you state the following, “…and the technology is hard-coded to use the Snap package store. Some may be nervous of this, as Ubuntu has total control, and in fact in order to make a Snap package you’ll need to sign a Contributor License Agreement (something that some people are very much against).”

    Read this blog post from Dustin Kirkland, a Canonical employee, and it might clear this up: http://blog.dustinkirkland.com/2016/06/howto-host-your-own-snap-store.html

  4. You said:
    “Some people say that too much choice on Linux is bad. We have too many distributions, too many binary package formats, too many file system choices, too many desktop environments, and the list goes on. However, I think that what some say is a weakness is also a great strength. We can hedge our bets with both Snappy and Flatpak. If one ends up being bad we can try something else, or if they’re both goo it’s a win-win situation where we all reap the benefits.”

    That has been the FLOSS party line since 20 years. It means chaos, anarchy, and failure. Microsoft loves you.

    • “It means chaos, anarchy, and failure. Microsoft loves you.”

      the last part is correct but not because of the first part. microsofts customers love linux and therefore microsoft must cater to them. dot net anyone? sql server anyone? linux terminal in windows anyone? cant make an os or phone to save their lives but they can listen to their customers. developing on windows is almost dead and developers are demanding linux. want to run that sql server in a linux shop? just got a lot easier. customer demand wags the microsoft tail. baby balmer is gone and forgotten. if chaos and anarchy bring this kind of business to linux, bring it on.

  5. I chose flatpaks for one simple reason: I am fed up with Ubuntu and Canonical. Mark Shuttleworth wants to be the next Bill Gates and we have all seen what came from him. Canonical wants to take over the entire Linux world with them as supreme leaders. When that happens it won’t take long till they charge money for it and because they own Linux, or at least their version of it, there is no other choice. That is not what Linux stands for and that is not what I, and hopefully many others, want.

    • No need to sweat. If Canonical starts charging for Ubuntu, we’ll see how many current *buntu users will be willing to fork over the money. If they are counting on the commercial market, they have an uphill climb against RedHat, Oracle and SUSE. Canonical and Shuttleworth trying to control the Linux world is like trying to empty out a lake with a fork. There are too many other free distros users can turn to. Linux users are used to getting their software for free.

Comments are closed.

Sponsored Stories