Flatpak and snap packages: the dependencies that nobody talks about. because they do have some

Dependencies of a flatpak package

In Linux there are many ways to install the same software. It is something that Linus Torvalds has come to complain about, and since 2015 or so there are at least two other options: flatpak and snap packages. One of the claims that we can find in both cases is that they include the main software and dependencies in the same package, which makes them work from the beginning, they are cleaner and so on, but this is half true.

Suppose we don't use any flatpak packages and we want to install only one because we need it. What you see in the header capture is precisely the third in contention, more specifically an application called Immagini with which we can create AppImages, that kind of portable app which can run, in theory, on any Linux distribution if the architecture is compatible. Images has a weight of 22,4mb, but to be able to install it we need… 1325MB Of space. As?

Shared dependencies, but dependencies nonetheless

What leads me to write about this is partly from conversations I had with a user some time ago, new to Linux, about what type of installation was best. My answer in the end was the usual, something like what best suits your needs, but he was doubtful about the weight of the applications. He was confusing the one in the main software with the total weight if you need some dependency, which usually needs them. But they are not dependencies like those of the official repositories.

For example, when we want to install a program that converts multimedia files to other formats, if we don't already have it, it will probably download FFmpeg and ImageMagick, each with a few more dependencies. These are dependencies to use, but those that are installed together with a flatpak or snap package are what is necessary for that program to be able to run on our platform. If the application is written in GTK or has GNOME components, it will install the GNOME platform and its translations. When we install another GTK/GNOME program, we will already have this, so it won't be necessary and the weight of the app will already be what we see in software stores.

In the case of Snap packages we have a bit the same thing. A few moments ago I noticed that I had the KDE Frameworks 5.98 snap package installed. I honestly don't know why, but probably because I did some testing with some snap that depended on Frameworks 5.98.

Keeping an eye on flatpak and snap dependencies

control packages flatpak that we have extra is easier, since there are several commands to remove what is not being used. The data and cache of the application are usually stored in ~/.var/app, and can be easily deleted by hand because it is inside our home folder and without protection, something like what is inside .config. If we want to remove it with the terminal, we will have to use this command:

flatpak uninstall --delete-data

To remove the dependencies of a package, which to use the correct name we should say "runtimes", the command would be:

flatpak uninstall --unused

If what we want is to eliminate everything, we must write:

flatpak uninstall --all

I have never used the last one, partly because it is designed as a means to reset all what is related to flatpak. It will be possible to reinstall a flatpak package, but we will start from scratch. It's for general cleaning.

As for snap packages, there is nothing like it, or at least I don't know about it. When we install an application, it appears inside the snap folder. If we remove the package, its contents are gone, but its configuration files are not, and they may be in .config, .cache, or some other folder. Runtimes or dependencies, along with packages, are usually in /var/snap/ or /var/lib/snapd, but be careful what you touch here. My recommendation would be to pull software store, and if it has a section for it, go to the installed snaps tab. If we see something we know we're not using, delete it from there.

We can also write snap list, find what we know we're not using and remove it with snap remove "paquete".

ending on a positive

Although you have to know that they exist, and sometimes we can get goosebumps seeing what an application can occupy when installing it, not everything is bad. When I started using Linux, the person who taught me the first thing I learned told me that Linux applications were very light, and that was thanks to the fact that there is software and dependencies that are shared with other programs. This is perfectly applicable to flatpak and snap packages: if these dependencies did not exist, each new package that needed them would have to include them in itself, so the applications could be very heavy. As things are, the only heavy ones will be the first; the following will no longer have to download anything extra.

It was something that had to be explained, and decision-making is always better when informed.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Pedro said

    data… to fix the installation of flatpak you can run 'flatpak repair'. More than once he helped me.

  2.   cuisine said

    I don't use flatpak or snap, I continue with the traditional, I don't see that sudden fever for flatpak, snap, or appimage, when in the past they didn't exist and we installed everything without problem and I continue to do so.