Does Flatpak share dependencies?

You know how with pacman all the dependencies are shared with other applications? So if I were to use flatpak instead, are all the depedencies/packages shared together just like with pacman?

1 Like

In a nutshell, all the dependencies for normal Pacman packages are NOT shared with flatpaks.

In Flatpak, there’s a number of “runtimes” which are a set of huge libraries that are shared among all the installed Flatpak packages. So for example if you just started using Flatpak and you wanted to install “GNOME Web” program as a Flatpak package, you’ll first need to download and install the GNOME X.xx runtime before you actually install the app. This runtime is shared between all Flatpaks, so you’ll have to download it only once. Like pacman and packages, flatpak will install the app you desire and figure out what runtimes are needed and installs them together.

The way I understand this, for flatpaks the runtimes are created under rules and protocols issued by to ensure standards and compatibility.

In addition to @joekamprad links, here is an article which goes into depth on App Packages. App Packages are the generic term for Flatpaks, Snaps, and others.


1 Like

Thanks I will have a look at it

Sorry, I know for sure pacman packages won’t share anything with flatpak as they are complete different package management systems.

I see.

Would flatpak automatically install GNOME X.xx runtime or do I have to manually download it from somewhere else?

I see, so like if another application depends on GNOME X.xx runtime it won’t need to install it again and it will just share it?

I see mate.

I will have a look at it thanks for the article.

So I just have one last question, if I used flatpak, can it become more bloated compared to using pacman in terms of space usage?

installing 3 different flatpaks can call 3 different runtimes… or they can use the same runtime… installing the same 3 packages with pacman can be the same size can be less … and you will install on top of your existing system, the needed flatpak framework and the runtimes…

Yes, as stated above

This runtime is shared between all Flatpaks, so you’ll have to download it
only once. Like pacman and packages, flatpak will install the app you desire
and figure out what runtimes are needed and installs them together.  Just 
as pacman looks for dependencies and installs them together.

That is correct.

Yes, to a certain extent. But with today’s SSD capacities it hasn’t been a problem for me.

As an addendum:
Go to Flathub to see what apps are available.
So far, Flathub seems to be the clearing house for flatpak packages.

I started using flatpaks because when I installed the Firefox package AND the VLC package together, Firefox would have very distorted audio when running a HTML5 video. The cisco h264 codec built into Firefox and the cisco h264 codev that VLC used were conflicting. I uninstalled the VLC package, and installed the VLC flatpak, problem gone.

Here is my rule of thumb. Any package that is provided by the DE itself, such as Gnome-terminal, gnome-this, and gnome-that, I run as a package. Any app that is put out by a 3rd party entity, such as LibreOffice, VLC, Audacity, or Handbrake none of which have anything to do with gnome, I install as flatpaks. Here is why. If gnome-this needs libaudio.2-1 (made up lib) and libaudio.2-1 gets updated to libaudio2.2, it will get updated along with gnome-this. Suppose VLC as a package also used libaudio.2-1, but it’s developers decided that there is nothing new in libaudio.2-2 that they utilize, so they don’t update VLC to use the new libaudio. Now you have to downgrade libaudio for VLC to work but gnome-this won’t work, or wait until VLC developers decide to issue an update to VLC which uses libaudio.2-1. But if VLC is a flatpak, it does not matter. I hope that makes sense.

Anyway, to each his own. There is more than one way to skin a cat. However, you are doing the right thing by researching this and then making the decision as to how you want to do things.


Thanks mate :slight_smile: So I guess I could use flatpak as long as if I can make the size the same amount as using pacman.

Thanks mate.

How much of a difference is it compared to using flatpak and pacman?
As stated by @joekamprad:

Is it possible to ensure that all flatpaks are sharing the runtime libraries so that it uses the same amount of sizes as compared to using pacman?

If this is not possible then is it possible to configure firejail in such a way that it any new applications added have to run through firejail?

Oh I see, that makes sense.

Thanks mate.

It depends on the app. I use Gnome for my DE, so most apps based on GTK can share a lot of runtimes. The worst offender that I use is VLC. That is because VLC is based on QT, so it pulls in a lot of QT stuff that the rest of my flatpak apps don’t use. But VLC just suits my needs so much I put up with the extra runtimes.

I am doing this from memory, but back when I was using Antergos, I looked at the memory used by my system. Then I uninstalled Audacity, Gimp, Handbrake, LibreOffice, and VLC as pacman packages. Then I reinstalled them as flatpaks and checked the memory used again. The five flatpaks used about 500 MiB more than the pacman packages. To me, that’s not too bad considering the size of SSDs today. I also timed how long each app took to launch both as packages and flatpaks. The flatpaks launched slightly quicker, but not enough to really matter. I didn’t notice any performance difference when running the apps.

So I choose what apps to install as flatpaks, mostly apps not directly associated with the DE. This helps to eliminate problems that can occur with rolling distributions during updates. Also, I can remember in the EndeavourOS forum I believe, that someone wanted an app that wasn’t available in the normal Arch repositories, and the AUR package was out of date and broken. However, the desired app was available as a flatpak.

Sorry, I don’t know anything about firejail, so I can’t help you there.

Have fun playing around with your chosen OS and DE. So much to explore with Linux.


1 Like

Wow that is quite bad mate if it uses 500 MB more. I know you did mention that SSDs size is much larger these days. But wow that is a huge difference.

Oh that’s good.

Oh I see so I guess I can keep flatpak as a backup.

All good :slight_smile:

Thanks bro :slight_smile:

One other question, is snap the same as flatpak except it is an alternative to flatpak?

The way I understand it, Flatpak was developed by a consortium of Fedora/Redhat,, various developers, and others. is the main repository for flatpaks. For the most part, flatpaks will notify when updates are available, and then you initiate the updates.

Snaps were created by Ubuntu developers. Not sure about Snap repositories, Ubuntu controlled?
Snap queries your computer and AUTOMATICALLY update themselves, evidently without notice to the user. Not 100% sure about the without notice part.

Ah, just found this info @
“Keeping your system up to date
The good news is that snaps are updated automatically in the background every day!”

I did research on both and chose Flatpaks. I’m going to leave it at that.

All readers, if any of the above information is incorrect, please feel free to correct me.

1 Like