Credit: www.flatpak.org
Flatpak is an application distribution (aka packaging) system for Linux that can retrieve and install software from an online repository or from downloadable package description files. This might make it sound like the standard packaging systems that are central to every Linux distribution, but it has a number of advantages over those traditional systems.
First off, built-in packaging archives can be just a snapshot archive of software, so distribution packages can often be out of date. Flatpaks were built to enable time-poor developers to easily knock out the latest builds of their software. When a developer packages their application with Flatpak, they make a single package that can run on all of the major Linux distributions. It’s also appealing because the developer can include all needed dependencies and libraries with the application. This gives a further advantage because it means that you are running the tested and approved combination of components, even if it means that the Flatpak package is running different components on the rest of your system.
These dependencies are bundled into what Flathub calls runtimes, and these are downloaded with each application. This uses a bit of extra space, but Flatpak carries out deduplication, and a runtime that is shared between more than one Flatpak package doesn’t have to be installed more than once.
The reason that Flatpak can operate in this way is because it uses what is called sandboxing, which means that each application is isolated from the operating system and the underlying hardware of the computer. Obviously, a piece of software isn’t much use if it can’t communicate with the resources of the computer and with the user, so it is up to the developeralso integrate with the system in areas such as being listed on application menus.