In a previous article, I discussed the evolution of software installation on Linux, beginning with the early days of compiling software from compressed packages known as tarballs. Red Hat developed the package managers yum and later dnf, while Debian introduced apt. Other distributions, such as Arch, use pacman, and Suse employs Zypper and Yast. Although these package managers have significantly improved the safety and precision of software distribution, challenges still arise, particularly when distributing software that could break your system if the dependencies of one application conflict with those of another. Additionally, the need to provide .deb files for Debian-based systems, rpm files for RHEL/Fedora/Suse, and AUR packages for Arch adds complexity for developers.
Enter Snap, developed by Canonical. Snap packages are a modern solution for software distribution on Linux. Designed to address the complexities of traditional package management, Snap packages encapsulate an application and all its dependencies into a single unit, ensuring consistent performance across different Linux distributions. Snap packages are a modern solution for software distribution on Linux. Designed to address the complexities of traditional package management, Snap packages encapsulate an application and all its dependencies into a single unit, ensuring consistent performance across different Linux distributions. This means developers can create and distribute their applications without worrying about specific system configurations or conflicting dependencies. With support for various Linux distributions, Snap aims to simplify cross-platform compatibility and enhance the overall ecosystem. Snap software is open source under a GPL v3.0 license. This means developers can create and distribute their applications without worrying about specific system configurations or conflicting dependencies. Snap supports a variety of architectures, including AMD64, ARM64, ARMHF, RISC, i386, RISC-V and others. The Snap Store hosts thousands of packages, but the exact number fluctuates continuously as developers publish, update, or remove snaps. While Snap is open source, not all packages in the Snap store are open-source. Some, like the Opera browser, Slack, and Spotify, are proprietary.
While Snap was built by Canonical, Alexander Larsson, who works at Red Hat, developed Flatpak. Like Snap, its applications are sandboxed and can run on a variety of Linux systems. Flatpak and Snap packages differ primarily in their underlying design philosophies and ecosystems. While both technologies aim to simplify application distribution on Linux by bundling applications with their dependencies, Flatpak emphasizes a more decentralized approach. Flatpak applications are designed to run in a sandboxed environment, ensuring better security and isolation. This allows users to control permissions more granularly and manage how applications interact with the system and each other. Additionally, Flatpak uses a concept called “runtimes,” which enables shared libraries to be utilized across different applications, potentially reducing storage usage. Flatpak is open source with an LGPL license. Flatpak is supported by 38 Linux distributions. Flathub currently offers over 3200 applications. Several factors have influenced Flathub’s growth: broader distribution support, developer adoption, a verified apps program, and Steam Deck integration.
Snap works on any distribution that installs snapd. It’s packaged for all major Linux families, including Debian-based, Fedora-based, Arch-based, and Red Hat Enterprise Linux. Some distributions like Ubuntu ship with Snap preinstalled. Others require configuring it manually. OpenSUSE does not officially support Snap. Flatpak has much wider support across major Linux distributions, including Fedora, Debian, Linux Mint, Pop!_OS, Arch Linux, OpenSUSE, NixOS, CentOS, and Red Hat Enterprise Linux.
In conclusion, both Snap and Flatpak represent significant advancements in overcoming the challenges of software distribution on Linux. As the Linux ecosystem continues to evolve, the choice between Snap and Flatpak will likely depend on the specific applications required, the desired level of system integration, and individual developer or user preferences. With increasing support from distributions and a growing repository of applications, both technologies promise to simplify software management and enhance the user experience in the diverse Linux landscape. Ultimately, the ongoing development and adoption of Snap and Flatpak will contribute to a more versatile, secure, and efficient software environment for Linux users worldwide.