Flatpak vs. Snap: 10 Differences You Should Know
Flatpak and Snap packages are more popular than ever among Linux users who no longer prefer native binary packages or AppImages.
Primarily because of its ease of use, integration with the software center, and the ability to get the latest app updates hassle-free.
You no longer need to worry about the dependencies when installing an app.
For some, the security advantages of sandboxing/isolation are a factor too. But we will not discuss the specifics for that here.
No matter the benefits of Flatpak and Snap, what are their differences? What should you consider using? In this article, we explore how they’re distinct to help you decide what you want to use.
Snap was developed by Canonical to build applications for IoT platforms. The aim behind Snap has always been to encourage app updates, and make things easier for developers to maintain them when compared to deb packages.
Eventually, it made its way for applications meant for desktops (with GUI as well).
If you want to explore more Snap’s history, I recommend you to read the blog post by Alan Pope.
Flatpak was created by Alexander Larsson, Principal Software Engineer at Red Hat. It is an independent open-source project where many notable developers from GNOME, Fedora, and Red Hat are involved.
The aim behind it was to have a robust framework to distribute Linux desktop applications across various distributions.
Originally, it was known as xdg-app, and later renamed to “Flatpak” in 2016.
For more interesting insights on Flatpak’s history, take a look at Alexander’s old blog post.
2. Use Cases
Every package format has its advantages. Some might say, “why do we need this“?
We need every package format available. So, you can choose to use whatever you need per your requirements. Hence, it is essential to learn where and why Flatpak and Snap packages can be helpful.
Flatpak is only tailored for Linux workstations and personal computers to run desktop applications. You can explore more about it in our resource on what Flatpak is.
However, Snaps work on your desktop and can also be used for server-focused terminal applications.
For instance, Ubuntu Core, the operating system for IoT, and Edge are built from snaps to keep things secure and ensure reliable updates.
As far as I know, Flatpak has not been used for anything similar because of its different approach and targeted use case.
3. Startup Time
Snap applications have been known to have a slow startup compared to Flatpak.
Canonical has been working on this for a while, but it was still a problem when publishing the article.
Of course, practically, not every user may notice or care about the difference. But, the overall consensus regarding the app startup time remains better for Flatpak compared to Snap.
For instance, I find launching the Spotify app as a Flatpak faster than its Snap. It can be subjective. So, take it with a pinch of salt.
The performance of an app not only refers to its responsiveness but its stability and feature offerings.
Some applications perform better as Snap, and some as Flatpak.
For instance, the Flatpak version of GNOME Boxes does not support device sharing compared to its Snap package. One can use this example to say that Snaps are better.
However, I always prefer to install Spotify as a Flatpak instead of Snap.
So, you need to test your favorite applications to realize what is better for you; no one gets a clear edge here.
5. Availability and Popularity
While you can install either of them on any Linux distribution, Flatpak gets an edge for its availability and out-of-the-box support on more distributions when compared to Snap.
For instance, Linux Mint comes with snap disabled but features Flatpak support built-in.
Distributions like Pop!_OS and Ubuntu MATE also offer Flatpak support by default. In other words, you will find plenty of different Linux distributions (other than Ubuntu flavours) that have Flatpak baked in by default.
However, Snaps are preferred mainly by Canonical’s Ubuntu and its official flavors. If you are not using Ubuntu or its flavors, refer to our Snap guide to get it setup.
So, one can say that Flatpak’s adoption for Linux desktops is much wider (if not necessarily with a more extensive user base).
6. Open Source vs. Closed Source
Flatpak is entirely open source.
Unfortunately, when it comes to Snap packages, the answer is not as simple.
Snap is an open-source project at its core, including snapd, the background service that manages/installs snap apps.
However, the back-end of the snaps is proprietary and controlled by Canonical without any community involvement.
As an end-user, you should not have a problem with the closed-source parts of Snap as long as the app gets the job done.
Of course, Flatpak will be your choice if you prefer completely open-source technologies.
Suggested Read 📖
7. Decentralized vs. Centralized
Flatpak is open-source and embraces a decentralized approach.
Even though we have a famous “Flathub” portal where most users get their apps from, Flatpak allows having multiple stores when/if needed.
With Snap, you are limited to Canonical’s Snap store.
Some users prefer a centralized application store for convenience. So, you should not have any issues with either of them. However, Flatpak gives you an edge to add an extra repository if needed.
Snap applications get updated automatically by default. The user can modify when and how often the updates happen. Also, you can hold and postpone updates for selected snaps.
On the contrary, Flatpak packages do not get updated automatically. If you have Flatpak integration with the software center, you will be notified of available updates, but it will not be forcefully updated.
You can always refer to our guide on updating Flatpak packages.
With Flatpak, you get more control by default. But, some users forget to update the packages missing out on new features or security/bug fixes.
So, whether you want automatic updates to the applications you use or want the control to update them manually, that will influence what you like better.
Flatpak does not need admin privileges to install applications but Snap does.
Flatpak comes with sandboxing enabled by default. It uses Linux Kernel’s namespaces feature for sandboxing whereas Snap utilizes AppArmour.
You can explore both the developer documentations to learn more. But, these two key points might influence picking one of them for your use-case.
10. Maintainer’s Perspective
When going through forums and Reddit threads before writing this article, I found some interesting insights from app maintainers. Some of those include:
- Snaps are easier to maintain/build compared to Flatpak packages.
- Snap security is a tad bit advanced.
- With Flathub as Flatpak’s store, maintainers get help from various developers to test and improve the Flatpaks.
Of course, for further technical information and differences, the documentations will be a great place to start.
💬Which one do you prefer? Flatpak or Snap? And, why? Share your thoughts in the comments section below.