So I know my way around Linux pretty well. However I never really got the gist of the difference between Snap, Flatpak and Native packages.
What exactly sets them apart?
Why does everyone seem to hate snap?
I have been using all of them, simultaneously on the same system and never really noticed a difference in the way installation, updates etc are handled (syntax ofc).
I hear snap sandboxes? Is that the main reason? Thanks for your insights…
Flatpak is fast, lightweight actual open-source and provides security via isolation. Snap is the usual BS Canonical tries to get people to use, has a ton of bloat.
Personally I’ve had zero issues with Flatpak under Debian for desktop usage. It integrates nicely with the GNOME Software “store” and allows you to get the latest and best of everything you might need without polluting your system. Flatpak solves the usual complaints about Debian only having “old” software - allows you to run the latest and greatest while keeping a clean and rock solid Debian system underneath.
From a technical point of view:
- Appimages are like MacOS .app programs. You download a random executable from a random website, that contains everything it needs to run. It’s the antithesis of the Linux way. Great for portability, awful for everything else. There are no automatic updates unless the developer explicitly bothers to implement them.
- Snaps are like docker containers. Each snap also contains everything it needs to run, but at least there is a centralized update system.
- Flatpaks are like another package manager layered over your OS. It manages its own dependency system isolated from your main dependency management. It updates its stuff pretty much like apt/dnf/pacman.
- Native are managed through your distro’s package manager, obviously.
From a feature/version point of view:
- If you have a bleeding edge or quickly moving distro, native packages are fine if you want/need up to date software. Arch users shouldn’t need Flatpaks for example. The downside is that those packages are made by the distro’s maintainers so can be anywhere from untested pre-release software (happened in Manjaro) to extremely outdated (like in Debian oldstable).
- Flatpaks/Snaps/Appimages are more and more maintained and packaged by their developers. It’s great for them as you only need to package once, all bug reports are on versions you control, and you don’t need to depend on a distro’s maintainer time and will to push updates to users. For stable distros users, this is theoretically the best of both worlds: a stable, tested OS with up to date user facing applications.
From a philosophical point of view:
- Appimages and Flatpaks are fully FOSS. Flathub is the dominant ways of distributing Flatpaks but anyone can create a competitor.
- Snaps are distributed through Canonical’s Snap Store, which is not FOSS and is vulnerable to Canonical’s corporate meddling.
My personal preference:
- Flatpaks for GUI apps, native for CLI tools
- Appimages as a last resort if it’s the only way to get a specific app.
- Snaps never.
Companies like Red Hat, OpenSUSE and Canonical are not only trying to sell support but also convince others that they are innovating. Red Hat kickstarted Flatpak and then Canonical, who didn’t want to “lose” decided to push their own thing, Snap with the strength of ten thousand suns. Naturally, this is a simplified explanation, Snap already was in development at the time but if we truly followed the spirit of open source, Canonical would have dropped it and adopted Flatpak instead.
OpenSUSE has quite a few products in the kubernetes sector, even Oracle has its own things they can brag about. Canonical has basically nothing and this is why they’re pushing snap as if their lives depended on it.
Remember, Linus didn’t write an OS because the GNU folks were writing one, GNU didn’t write a new kernel after theirs failed, because Linus had a working one. This is the nature of free software, Canonical has completely forgotten about it. Red Hat now too.