Table of Contents
Universal package formats in Linux
In addition to traditional distribution specific package managers, you will often encounter three universal packaging systems on modern Linux desktops, Snap, Flatpak, and AppImage. They all aim to make it easier to install the same application across many distributions, but they do this in different ways and with different tradeoffs.
This chapter focuses on what is unique about each of these systems, and how you use them at a basic level. General package management concepts such as repositories, dependencies, and upgrades are discussed elsewhere, so they are not repeated here.
Important idea: Snap, Flatpak, and AppImage are not replacements for your distribution’s native package manager. They are additional tools, mainly focused on desktop applications and portability across different Linux distributions.
Snap
Snap is a packaging and runtime system created by Canonical, the company behind Ubuntu. It is most commonly used on Ubuntu and Ubuntu based distributions, although it can be installed on many others.
A Snap package bundles an application together with most of its libraries. Snaps are managed by a background service called snapd. Applications are typically installed from a central Snap Store that Canonical operates.
Snap characteristics
Snaps are containerized applications. Each snap runs in its own confined environment and has limited access to the system, controlled through a permission system called interfaces. This focus on confinement and auto updates makes Snap particularly common for desktop apps and some server tools.
When you install a snap, it is mounted in a read only filesystem under /snap. Multiple versions of the same snap can exist side by side, which is useful for rollbacks and testing different releases.
Basic snap commands
On systems where Snap is available, the main command is snap. You will usually need sudo for administrative operations, because installing snaps affects the whole system.
To search for a package in the Snap Store you can use:
snap search nameTo install a snap:
sudo snap install name
Some snaps have different channels, such as stable, candidate, beta, or edge. You can specify a channel during installation:
sudo snap install name --channel=betaTo list installed snaps:
snap listTo update installed snaps:
sudo snap refreshIf you want to remove a snap:
sudo snap remove name
Auto updates are handled by snapd in the background. If you are using a desktop oriented Ubuntu system, you will probably see some applications installed as snaps by default, and you will manage them through these commands.
Flatpak
Flatpak is another universal packaging system, with a strong focus on desktop applications, sandboxing, and distribution independence. It is widely used by distributions such as Fedora, Linux Mint, and others, and it is very common in desktop environments like GNOME.
Flatpak separates three main concepts, the base runtime, the application, and optionally extra extensions such as themes or language packs. Applications depend on a runtime that provides common libraries, which reduces duplication between apps that use the same runtime.
Flatpak repositories and runtimes
Flatpak uses repositories called remotes. The most popular public remote is Flathub, which hosts a large collection of desktop applications that run on many distributions.
To use Flathub you usually need to add it as a remote once. On many distributions the desktop tools will do this for you, but from the command line it is done with a command similar to:
flatpak remote-add --if-not-exists flathub \
https://flathub.org/repo/flathub.flatpakrepo
The --if-not-exists flag prevents errors if the remote is already configured.
When installing an application, Flatpak will automatically install the required runtime if it is not already present. Runtimes are versioned, which helps ensure that applications continue to work even as the underlying system changes.
Basic flatpak commands
The main command is flatpak. For basic operations you usually also need sudo, because applications are installed system wide by default. Some distributions also support user scoped installations without sudo.
To search for an application in all configured remotes:
flatpak search nameTo install an application from Flathub:
flatpak install flathub app.id
A Flatpak application name is typically an ID like org.gimp.GIMP or com.spotify.Client. The full ID is used so that applications can be uniquely identified.
To list installed applications and runtimes:
flatpak listTo run an installed Flatpak application directly from the terminal:
flatpak run app.idTo update all Flatpak applications and runtimes:
flatpak updateTo remove an application:
flatpak uninstall app.idIf you remove many applications over time, old runtimes that are no longer required may remain. You can clean up unused runtimes:
flatpak uninstall --unusedOn desktop systems you will often manage Flatpak applications via graphical software centers. However, underneath, these commands are what those tools call.
AppImage
AppImage takes a different approach compared with Snap and Flatpak. It is a format for packaging and distributing portable applications as a single self contained file. You download an AppImage, make it executable, then run it. There is no central daemon, no runtime concept, and usually no system wide installation step.
AppImage characteristics
An AppImage is essentially an executable file that contains the application and nearly all its dependencies. It is designed to run on many distributions without requiring installation. This makes it similar in spirit to a standalone executable on other operating systems.
Because each AppImage bundles its own libraries, it does not integrate with the system package manager and does not share runtimes with other applications. It also does not automatically update unless the developer builds that feature into the AppImage itself or provides a separate update tool.
AppImages are typically distributed directly by application developers, often through their websites or GitHub releases, rather than through a single centralized store.
Running AppImage applications
Using an AppImage is straightforward. You download the file, usually ending in .AppImage, and then change its permissions so it can be executed. For example:
chmod +x MyApp.AppImageAfter that you can run it directly:
./MyApp.AppImage
Since AppImages are just files, you can keep them wherever you like. Some people create a directory such as ~/AppImages and store them there. To remove an AppImage, you simply delete the file. There is no separate uninstall command.
If the AppImage supports it, it may integrate itself into your desktop menu or provide an option to do so, but this behavior depends entirely on the application developer.
Comparing Snap, Flatpak, and AppImage
Snap, Flatpak, and AppImage all have the same broad goal, running applications on many distributions without depending on each distribution’s native repository. However, they differ in design and behavior.
Snap focuses on tight integration with snapd, automatic background updates, confinement, and a central store operated by Canonical. It is most deeply integrated into Ubuntu based systems, where some desktop and server applications are delivered as snaps by default.
Flatpak focuses on desktop applications, sandboxing, and shared runtimes, with a community driven ecosystem centered on Flathub. It is common in distributions that emphasize open desktops and is integrated into many graphical software centers.
AppImage focuses on portability and simplicity for end users. There is no central daemon or management command for installation. You manage AppImages as regular files, run them directly, and delete them to remove them.
Key summary:
Snap uses snapd and a central store, with background auto updates and system level management.
Flatpak uses remotes such as Flathub, shared runtimes, and strong focus on sandboxed desktop apps.
AppImage provides a single executable file for each app, with almost no integration with the system package manager.
In practice, many users mix these systems. You might install some applications from your distribution’s native packages, others from Flatpak or Snap, and occasionally use AppImages provided by developers. The important part is to recognize which system a given application uses, and to use the appropriate commands for installing, updating, and running it.