If you've started using Flatpak apps on your Linux system, you might have noticed that they seem to take up a surprising amount of room on your hard drive. Why Flatpak apps use so much disk space and are larger in size compared to traditional packages?
You might download a small app, but the download is huge. Or you check your disk usage and see that Flatpak is using many gigabytes, far more than the combined listed sizes of the apps you installed.
What's going on?
It's a common question, and it boils down to how Flatpak is designed to solve a big problem for Linux developers and users.
Table of Contents
The Big Problem Flatpak Solves
Traditionally, getting software to work correctly on different versions of Linux could be tricky. As you may already know, Apps rely on other software called "libraries" or "dependencies".
These dependencies can vary between Linux distributions and even different versions of the same distribution. This could lead to problems where an app wouldn't work because a dependency was missing or was the wrong version. This was known as "dependency hell".
Flatpak was created with a revolutionary goal: to let developers create one app and distribute it to the entire Linux desktop ecosystem.
It was built to work on any Linux operating system. The name "Flatpak" is even a nod to IKEA's flatpacking, suggesting efficiency and a new approach to packagingIt.
The Solution: Bundling Dependencies
To achieve this "build once, run anywhere" goal, Flatpak takes a different approach to dependencies than traditional Linux package managers (like those using .deb or .rpm files).
Instead of relying on the dependencies already installed on your system, Flatpak applications bundle all their necessary dependencies right inside the package.
This means the app comes with everything it needs to run, regardless of what's on your specific Linux distribution. This guarantees that the app has the correct versions of its dependencies, providing consistent environments for both developers and users.
Developers gain full control over dependencies, and users get apps that are future-proof and compatible with new Linux versions.
In contrast, traditional package managers try to install just one copy of each dependency on your system, which is then shared by all apps that need it. This saves space, but it can lead to compatibility issues.
Suggested Read: AppImage vs Snap vs Flatpak: Linux Package Formats Compared
The Reason Why Flatpak Apps Use Huge Disk Space
Bundling dependencies is the primary reason Flatpak apps are much larger than their traditional counterparts. If two different Flatpak apps both need the same library, they might each carry their own copy of that library unless it's part of a shared runtime.
For example, let us say you're trying to install Kdenlive, a video editor. The app itself might be only about 40 MB, but the download will be 3 GB because it needed a large set of related software called a "runtime".
Another notable example is GIMP. A GIMP Flatpak is around 2 GB, while an alternative package format (AppImage) is only 500 MB.
How Flatpak Tries to Save Space: Runtimes and Deduplication
Flatpak doesn't just bundle everything repeatedly. It uses a clever system to try and save space:
1. Runtimes
Flatpak uses "runtimes", which are shared base sets of common libraries. Applications declare which runtime they need.
For example, many GNOME applications use the org.gnome.Platform runtime, and many KDE applications use the org.kde.Platform runtime.
These runtimes are installed separately and can be shared by multiple apps that require them.
Even different runtimes share parts of themselves; the GNOME and KDE runtimes build upon the Freedesktop base runtime and share libraries from it.
Recommended Read: How To Remove Unused Flatpak Apps To Free Up Disk Space In Linux
2. Deduplication
Flatpak uses technology called OSTree, which is similar to the Git version control system. This system stores files efficiently in a central repository, and when an app is installed, it creates "hard links" that point to the files in the repository.
This means the same file that belongs to multiple applications or runtimes is only stored once on disk. The OSTree system also makes updating efficient and allows for easy rollbacks.
Thanks to runtimes and deduplication, installing a second or third Flatpak app that uses the same runtime you already have will generally require a much smaller download and use less additional disk space than the first one did.
If you're interested to know more, this source provides examples showing significant file sharing (deduplication) between different runtime versions or between base runtimes and derived runtimes.
Why the Disk Space Still Adds Up (and Can Look Confusing)
Despite the space-saving techniques, Flatpak still often uses more disk space than traditional packages. Here's why:
- Apps still bundle dependencies not included in the runtimes.
- You might end up with multiple versions of runtimes installed over time.
- The way Flatpak stores data in its internal repository, combined with how standard tools like
ducount hard links, can make the reported space usage look larger than it truly is in terms of unique data blocks. - The initial download size and disk space usage can be very large if you don't already have the necessary runtimes installed.
- Updates can also require downloading large amounts of data if runtimes need updating too.
Is Flatpak Worth It?
The large size of Flatpak apps is a significant concern, especially for users with limited disk space (like small SSDs) or slow or metered internet connections. In some instances, the space used by Flatpak can exceed the size of the entire operating system itself for just a few apps.
But, I (including many users) see the trade-off as worthwhile. Flatpak provides a reliable way to get newer software, solves historical distribution problems for developers, and offers sandboxing to run apps in an isolated environment for security.
Flatpak is not suitable for servers because it relies on desktop features.
Frequently Asked Questions (FAQ)
A: Flatpak applications are designed to bundle all their dependencies.
This means that the software an application needs to run is included within the Flatpak package itself, rather than relying on shared libraries installed on your system. This is why Flatpak apps are so big.
A: Yes, Flatpak uses runtimes, which are collections of common libraries that applications can depend on. When multiple Flatpak apps use the same runtime, they share that runtime.
Additionally, Flatpak uses a technology called OSTree, similar to Git, for versioning and distributing filesystem trees. OSTree allows for file deduplication, so the same file used by multiple applications or runtimes is only stored once on disk.
A: Yes, download sizes can be very large with Flatpak, particularly for the first few applications you install or if an app requires a runtime you don't already have. This is because you might need to download a full runtime, which can be quite large.
Updates can also require downloading significant amounts of data if the application or its dependent runtimes have new versions.
A: May be not.
The larger disk space usage and potentially huge initial downloads or updates are significant concerns, especially for users with limited disk space like small SSDs, or those have slow or metered internet connections.
For such users, traditional package managers which share system libraries may be preferable if the software is available.
Conclusion
Flatpak apps consume more disk space primarily because they bundle dependencies to ensure they run consistently across different Linux distributions.
While runtimes and deduplication help reduce this impact, the total space used can still be substantial, which is a drawback for users with limited resources.
But, this larger footprint comes with the significant benefits, such as simplified app distribution and sandboxing.
Flatpak is a different approach to software packaging, with its own set of advantages and disadvantages. It's up to you to decide if you really want to use flatpak apps or not.

6 comments
You forgot one obvious thing. Those runtimes like freedesktop, gnome, kde, etc contain much more than the app will need, but if you need one library from it, you have to install the whole runtime.
Agreed.
How come Android manages to do “flatpak” APK’s at tiny sizes? Linux needs to go on a diet…
Yes. I also wonder how come the size of the Windows portables is same as its binary counter parts.
This is almost as bad as Windows 11 forcing features you don’t want! I happen to be perfectly fine using the .DEB’s and .RPM’s of the distros I use. And sometimes you go to install software, and all there IS in “Software” are flatpaks….when did we lose the FREEDOM to CHOOSE!? Sad times for the Linux community.
“And sometimes you go to install software, and all there IS in “Software” are flatpaks….when did we lose the FREEDOM to CHOOSE!?”
I guess developer used their freedom to choose too. Don’t get me wrong I hate flatpaks, snaps and appimages too, and use .deb flies when ever i can, but you can’t force developers either. I am guessing developers prefer working on their apps rather than porting it to many different packages.