On this website, you will find tutorials for installing & managing software, lists of the best linux resources, and in depth guides to linux.Join us on Slack
Snapcraft, AppImage, and Flatpak ... which one is the best?
Distro agnostic installation of packages is a long time coming. There are literally thousands of different distros, and a fair amount of them implement their own package managers - that means there are dozens of different package systems to develop for. This is where cross-distro packages come in. There are 3 major systems: Flatpak, AppImage, and Snapcraft. Snapcraft is by Ubuntu, and the other two started as individual projects.
Snapcraft is a project developed by Canonical (parent company of Ubuntu). Their website says that snaps are packages that are "for every Linux desktop, server, cloud or device, and deliver updates directly". This is a bold claim - their website also points out that snaps update automatically. It's not really clear what the difference is between snaps and deb packages - you need to install services to get snap to work, so it's basically just installing another package manager on your system.
It does come with the benefits of a package manager though: A central repo, managed updates. Their sandboxing is provided by AppArmor, Ubuntu's app permission management software.
sudo pacman -S snapd
sudo apt install snapd
# On Sid: sudo apt install snapd
sudo dnf install snapd # Fedora 24 users sudo systemctl enable --now snapd.socket
Install the overlay.
sudo zypper addrepo http://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_42.2/ snappy sudo zypper install snapd
(1012 apps at time of writing) UAppExplorer
AppImage is by far the simplest solution of the three. To use an AppImage, you simply add permission to execute the file and then run it, the same way as running a bash script. However, not everything is sunny: there is optional sandboxing, and to install an update, you have to replace the entire installation (there is a basic updater but not many projects use it).
To try it out, I installed Etcher, a program to burn iso files to disks. Here is the process (I am doing the entire process through the GUI. Installing an AppImage from the shell is just as easy).
2. Extract the zip file and open the extracted files.
3. Right click the `.appimage` file, select properties, and ensure that "allow executing file" is checked.
4. Double click the AppImage file
Although easy to install, the pain comes after a few months. I think that a system using AppImage as the main software management tool would be a pain; it would have to replace all installations every few months.
(120 apps at time of writing)
What makes flatpak different from both Snapcraft and AppImage is that is brings shared, constantly updated runtimes (e.g. the kind of libraries that make Steam a mess to install on distros that are not Ubuntu) into the picture. Unlike AppImage, libraries/runtimes do not need to be bundled, reducing file size of apps and providing a much cleaner, auto updating experience. (Also, it's integrated into gnome-software already...)
One of the caveats is that there is no central repo. For every new app from a different developer, you have to add a new repo. Sandboxing custom, with SELinux support.
sudo pacman -S flatpak
sudo add-apt-repository ppa:alexlarsson/flatpak sudo apt update sudo apt install flatpak
sudo apt install flatpak
sudo dnf install flatpak
Install the overlay.
sudo zypper install flatpak
(88 apps listed on their website at time of writing)
|No software necessary to install a package||No||Yes||No|
Personally, I would bet on Flatpak. A lot of it is similar to Snapcraft, but I found the installation (on distros other than Ubuntu, e.g. Arch) of Snapcraft a lot more difficult and buggy, and the updates and install process of Flatpak was easier. Even without a central repo, the process seems more solid.
Their shared library system works across any distro automatically, and they include more variety and better apps (Steam is actually packaged as a Flatpak now! Goodbye difficult install on Arch). Also, the awareness of Flatpak is better in the Linux community; Google "Snapcraft" and the first result is a Minecraft server.
Even though AppImage has Linus Torvald's vouch, Flatpak beats it through smaller app files and better updates - even though you need to install a package to start using Flatpak, the features it provides are much better in the end.
Don't agree? Share your thoughts below