target OS is debian or linux mint
Pro apt:
- storage efficient
- may be optimized for stuff like x86_64 v3 or v4
- runs as many users and easily from terminal
- needed for some low level stuff like system packages
Contra apt:
- a ton of stuff comes from outside the main Ubuntu repo. Debian doesnt have that difference afaik but still many packages may be more abandoned
- 3rd party packaging 99% of the time, i.e. “unverified”. I had a lot of strange bugs especially with Ubuntu packages
- the apps ars not isolated at all
Pro Flatpak
- a ton of verified apps, nearly unavailable on other repos (that still doesnt make unverified apps insecure!)
- all apps have a sandbox that can be graphically hardened to be more secure, if the defaults are too broad
- by defaults the sandbox is pretty good
- many many apps that run everywhere
Contra Flatpak
- not suited for some apps like terminal apps or system stuff
- some apps are less maintained and use EOL runtimes etc
- some more storage space needed
- need user namespaces, nearly all distros have them enabled
- a bit slower startup time but okay
- a bit more RAM usage
In general I agree, though had something to add regarding these points:
by defaults the sandbox is pretty good
This is a rather major problem with Flatpak; the maintainer decides what permissions they need by default, not the user. The user needs to retroactively roll them back or specify global options and manually override them per-app, but that’s not user-friendly at all. Though many Flatpaks do have good permissions because Flathub maintainers step in and offer suggestions before approving the Flatpak for publication, there are a number of Flatpaks that punch big holes in the sandbox; so much so that they might as well be unsandboxed.
But Bottles has a great sandbox, for instance, which is just what you’d want when running lots of proprietary Windows applications you maybe don’t trust as much as your Linux-y software.
It’s better than what we have with traditional packages but it can sometimes get in the way and not all beginners can easily figure out how to fix permissions issues with Flatseal. This will probably improve as we get more portals built.
some apps are less maintained and use EOL runtimes etc
Not much is different for distribution-maintained packages, either. See TheEvilSkeleton’s post about how there are over 1200 unmaintained packages in the Debian repositories, and even over 400 in Arch’s much smaller repositories that are outdated (!). At least Flathub applications are usually maintained by upstream, and so are usually as up to date as they can be.
not suited for some apps like terminal apps or system stuff
This isn’t really true. It’s only true when terminal applications need privileged access to something. Flathub ships Mesa userpace drivers and NVIDIA’s proprietary userspace drivers just fine. You can package something like
yt-dlp
in Flatpak just fine with--filesystem=host
. Hell, they’ve even got Neovim on Flathub. Sure, it’s a little more cumbersome to type, but you can always create an alias.Flatpak is not suitable for all graphical applications, either. Wireshark’s full feature-set cannot be supported, for example.
I would add that:
- You can easily rollback Flatpaks to a previous version (even from a long time ago) with
flatpak update --commit
. Much harder with traditional package systems, and you’ll probably need to downgrade shared libraries too. - You get a consistent build environment with Flatpak manifests. If you want to build a newer version of a stable package you’re using straight from
master
or with a few patches, all you really need to do is clone it fromflathub/whatever
, change a few lines, and it has a very high chance of building properly. No need to figure out dependencies, toolchains, or sane build options. And it’s all controlled from an easy-to-read and modify file.
- You can easily rollback Flatpaks to a previous version (even from a long time ago) with