Package managers test: AppImage vs. Flatpak vs. Snap

In the GNU / Linux world, software installation revolves around package managers. They care about solving dependencies and for trouble-free updating. Today we will test the 3 most popular managers independent of operating systems. Default package managers have a disadvantage that can also be their advantage. They are closely related to the operating system. Thanks […]

In the GNU / Linux world, software installation revolves around package managers. They care about solving dependencies and for trouble-free updating. Today we will test the 3 most popular managers independent of operating systems.

Default package managers have a disadvantage that can also be their advantage. They are closely related to the operating system. Thanks to this, system developers ensure their consistency and efficiently provide users with security patches. Unfortunately, this also means a lack of compatibility with other ecosystems. Therefore, application developers, by providing their software to users using different operating systems, must pack a multitude of packages in a number of different formats with each release. Sometimes, wanting to ensure trouble-free installation, even several packages in the same format.

Projects that have set themselves the goal of solving the above problem come to the rescue, by the way providing additional functionalities. In today’s ranking, we’ll look at the three most popular proposals for alternative package management systems: AppImage, Flatpak and Snap.

AppImage

AppImage is a software distribution format that sets itself the main goals: simplicity, binary compatibility, being independent of Linux distribution, no installation required, no administrator rights required, being portable, and not interfering with the operating system. Each program is a separate image with an extension packed with dependencies .AppImage. The main advantage of this format is its simplicity, thanks to which virtually any application can be packed in this way.

Installation and configuration

We download the image .AppImage, we give the right exercise and voilà! We can enjoy the software.

# source: https://inkscape.org/release/all/gnulinux/appimage/
$ wget -c 'https://inkscape.org/gallery/item/18465/Inkscape-4035a4f-x86_64.AppImage'
$ chmod +x Inkscape-4035a4f-x86_64.AppImage
$./ Incscape-4035a4f-x86_64.AppImage

In addition, it is possible to install a deamon that will support the integration of the AppImage application with our operating system. Installation instructions can be found on githubie project.

Distribution

The largest base of ready images is Appimage Hub. In addition, many developers decide to distribute their own programs also in AppImage format. So users can enjoy ready-to-launch images straight from the official project pages.

updates

A mechanism has been made available to developers to notify users of newer versions of the application. The update is manual, but has only two steps (see installation and configuration).

Flatpak

The application was a Flatpak precursor xdg-app created as part of the freedesktop.org project. One of the main features promoted under this package manager is the default sandboxing. In addition, installing programs under Flatpak assumes having a graphical environment. This is due to the fact that the engine itself is strongly dependent on the functionalities available in this environment.

Installation and configuration

On Enterprise Linux systems, Flatpak is automatically installed along with the graphical environment. All we have to do is configure the repository and install Inkscape.

  • configuration of the Flathub repository
    $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
  • Inkscape installation
    $ flatpak install --system flathub org.gimp.GIMP
    Required runtime for org.gimp.GIMP / x86_64 / stable (runtime / org.gnome.Platform / x86_64 / 3.36) found in remote flathub
    Do you want to install it? [y / n]: y
    Installing in system:
    org.gnome.Platform/x86_64 / 3.36 flathub 3369cd7cff48
    org.gnome.Platform.Locale/x86_64 / 3.36 flathub 6cc4e9265605
    org.gimp.GIMP / x86_64 / stable flathub 4cf7c8c966e5
      permissions: ipc, network, x11
      file access: / tmp, host, xdg-config / GIMP, xdg-config / gtk-3.0, xdg-run / gvfs
      dbus access: org.freedesktop.FileManager1, org.gtk.vfs, org.gtk.vfs.*
      tags: stable
    Is this ok [y / n]: y
    Installing: org.gnome.Platform/x86_64 / 3.36 from flathub

Distribution

In the case of Flatpak, we use an external server to download packed applications. You can create a repository offline, but this process is currently non-trivial.

updates

All installed packages can be updated with one simple command:

$ flatpak update

Snap

Snap is a software distribution system largely independent of the operating system. The project was created as the default package manager for the Ubuntu Touch system. Then he took the path to provide the agnostic manager from the environment in which he was launched.

Installation and configuration

snapdis in the EPEL repository for Enterprise Linux in versions 7 and 8. After enabling this repository, simply issue the following command:

$ sudo yum install snapd
Loaded plugins: langpacks, refresh-packagekit, rhnplugin, upgrade-
              : helper
This system is receiving updates from ELN Classic or EuroLinux EuroMan.
Resolving Dependencies
--> Running transaction check
---> Package snapd.x86_64 0:2.45-1.el7 will be installed
--> Processing Dependency: snap-confine(x86-64) = 2.45-1.el7 for package: snapd-2.45-1.el7.x86_64
--> Processing Dependency: snapd-selinux = 2.45-1.el7 for package: snapd-2.45-1.el7.x86_64
--> Processing Dependency: squashfuse for package: snapd-2.45-1.el7.x86_64
--> Running transaction check
---> Package snap-confine.x86_64 0:2.45-1.el7 will be installed
---> Package snapd-selinux.noarch 0:2.45-1.el7 will be installed
---> Package squashfuse.x86_64 0:0.1.102-1.el7 will be installed
--> Processing Dependency: squashfuse-libs(x86-64) = 0.1.102-1.el7 for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libfuseprivate.so.0()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Processing Dependency: libsquashfuse.so.0()(64bit) for package: squashfuse-0.1.102-1.el7.x86_64
--> Running transaction check
---> Package squashfuse-libs.x86_64 0:0.1.102-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================
 Package             Arch       Version              Repository
                                                               Size
====================================================================
Installing:
 snapd               x86_64     2.45-1.el7           epel      17 M
Installing for dependencies:
 snap-confine        x86_64     2.45-1.el7           epel     3.4 M
 snapd-selinux       noarch     2.45-1.el7           epel     319 k
 squashfuse          x86_64     0.1.102-1.el7        epel      18 k
 squashfuse-libs     x86_64     0.1.102-1.el7        epel      24 k

Transaction Summary
====================================================================
Install  1 Package (+4 Dependent packages)

Total download size: 21 M
Installed size: 60 M
Is this ok [y/d/N]: y
sudo systemctl enable --now snapd.socket

All that’s left now is to restart the computer.

$ sudo snap install inkscape
Warning: /var/lib/snapd/snap/bin was not found in your $PATH. If you've not restarted your session
         since you installed snapd, try doing that. Please see https://forum.snapcraft.io/t/9469
         for more details.

inkscape 1.0-6e3e5246a0-2020-05-07 from Inkscape Project (inkscape✓) installed

Distribution

The Snapa distribution is closely centralized around the repository managed by Cannonical. Although it is technically possible to create a new repository, the source code of the server part is not currently released. Everything is revolving around Snapcraft.

It is possible to install the program without connecting to the network. However, we must first download the Snap package with the program from another Snap installation connected to the network:

$ snap download inkscape
Fetching snap "inkscape"
Fetching assertions for "inkscape"
Install the snap with:
   snap ack inkscape_7627.assert
   snap install inkscape_7627.snap

After copying the files, we can install Inkscape offline by following the following commands:

$ snap ack inkscape_7627.assert
$ snap install inkscape_7627.snap

updates

Updates take place automatically and do not require any confirmation. On the one hand, this solution is an advantage because the user does not have to remember to perform the update. Unfortunately, this also means that we are dependent on testing and efficient error patching on the part of the developer, because the faulty program can be moved back to its previous working version only temporarily.

Summary

Each of the managers independent of distribution described in this article has its pros and cons. The differences between them result from the goals set by the creators of the projects. In the author’s opinion, the most promising format for a graphic system user is the Flatpak project. However, due to the strong integration with the graphical environment, it does not give the opportunity to use it in server environments.

Snap may seem suitable for this type of application. However, automatic updates and its development run by Cannonical, which has a history of abandoning the projects it has started, which does not encourage investing in this technology in server environments. These require application stability and long-term support.

In contrast, AppImage, the format that accompanies us the longest, has already become a kind of software distribution standard. An additional advantage is the ability to store AppImage images on a portable memory and run them on various systems. However, due to its technicality, it is difficult to call it a package manager and it can be compared to executable files .exe, known to us from the world of Windows operating systems.

To sum up, each system described in this article meets slightly different expectations, but fulfills the goals set by their creators. Installing each of them is simple and does not require a complex configuration. That is why I cordially encourage you to try these package managers independent of the operating system yourself.

blank Authors

The blog articles are written by people from the EuroLinux team. We owe 80% of the content to our developers, the rest is prepared by the sales or marketing department. We make every effort to ensure that the content is the best in terms of content and language, but we are not infallible. If you see anything that needs to be corrected or clarified, we'd love to hear from you.