You found an app you want to install. It's available as a Flatpak, a Snap, and an AppImage. Which one do you pick?

If you've ever browsed Linux software and wondered what these formats mean — and more importantly, which one is safe — this guide is for you. We'll cut through the noise and focus on what matters most: keeping your system secure while running the apps you need.


Why Do These Formats Exist?

Linux comes in many "distros" (distributions) like Ubuntu, Fedora, Linux Mint, and Arch. Each one has its own package system: .deb for Ubuntu, .rpm for Fedora, and so on.

The problem? A developer who builds an app for Ubuntu has to rebuild it separately for Fedora, then again for Arch. That's a lot of work.

Universal packaging formats solve this. Build once, run anywhere — no matter which Linux distro you use. Three formats lead this space today:

Format First Released Reached Its Current Name/Form Built By
AppImage 2004 (as klik) 2013 (renamed AppImage) Simon Peter, an independent developer
Snap Dec 2014 (as Snappy, Ubuntu-only) June 2016 (opened to other distros) Canonical (the Ubuntu company)
Flatpak 2014 (as xdg-app) May 2016 (renamed Flatpak) Alexander Larsson at Red Hat; now governed under freedesktop.org

A quick note on that middle column, since all three names hide some history: none of these projects started life under the name you know them by, and none of them started as a "community project" in the crowdsourced sense — each began as one developer's or one company's tool that later grew a wider community and, in Flatpak's and Snap's cases, cross-distro support. AppImage's predecessor, klik, was a solo project by Simon Peter; it was renamed PortableLinuxApps in 2011 and became AppImage in 2013. Flatpak began as xdg-app, built by Red Hat's Alexander Larsson, and picked up its current name in 2016. Snap started as Snappy, exclusive to Canonical's Ubuntu Core, and didn't become a genuinely cross-distro format until it was ported to Arch, Debian, Fedora, and others in mid-2016.

They all solve the same problem, but they do it in very different ways — and those differences matter a lot when it comes to security.


How These Formats Keep You Safe

Before we compare them, let's understand one critical concept: sandboxing.

What Is Sandboxing?

Imagine you hire a contractor to fix your kitchen. You could give them the keys to your entire house — every drawer, every closet, every safe. But that's risky. What if they peek somewhere they shouldn't?

Sandboxing is like giving the contractor a key to only the kitchen. The app gets access to exactly what it needs and nothing more.

When an app runs without sandboxing, it has the same access as you — the human sitting at the keyboard. It can read your files, see your SSH keys, and access anything your user account can touch.

The Trust Triangle

Every app installation comes down to three things:

  1. Sandboxing — Does the format lock the app in a box by default?
  2. Store vetting — Does someone check apps before you download them?
  3. Your choices — Do you grant the app more access than it needs?

If any one of these is weak, your security is at risk. Let's see how each format handles them.


Flatpak: The Desktop Security Choice

How It Works

Flatpak runs every app inside a sandbox built on a technology called bubblewrap. Think of it as a virtual room: the app lives inside and can only interact with your system through controlled doorways called XDG Desktop Portals.

Need to open a file? The app asks the portal. Need the camera? Same thing — the portal asks you first.

Flatpak also uses shared runtimes. Instead of each app bundling its own copy of GTK (a common interface library), five GNOME apps share one copy. This saves disk space.

Flathub: The App Store

Most Flatpak apps come from Flathub, the community-run app store. Flathub layers several checks together:

  • Verified Badges — A checkmark means the app is published by the actual developers, not a random third party.
  • Automated build checks — Every submission runs through automated tests that block unsafe or overly broad permission requests (like asking for whole-session bus access) and enforce reproducible, source-verified builds.
  • Human review — New submissions and permission changes go through manual review on top of the automated checks.

This is a meaningfully layered process, but it's worth being precise: it's not antivirus-style malware scanning. It's closer to "we check that your manifest and permissions aren't doing anything obviously reckless, and a human looks at it too."

The Hidden Risk: Over-Permissioning

Here's where beginners get tripped up. The sandbox is only strong if the app doesn't ask for more access than it needs.

Many popular Flatpak apps request flags like:

--filesystem=host
--filesystem=home

These flags bypass the sandbox entirely. An app with --filesystem=host can read and write anywhere on your system — same as running without sandboxing.

This happens because many apps need file access to function. A file manager needs to browse your files. A music player needs to read your music folder. But not every app needs this — and some ask for it anyway.

X11 vs Wayland: Why It Matters

If you're using X11 (the older display system), any app can capture keystrokes from other windows — including your password manager. Wayland (the newer replacement) prevents this. If security matters to you, Wayland is the better choice.

What You Should Do

  1. Use Flatseal — A free tool that shows every permission your Flatpak apps have. Review them and revoke anything that looks unnecessary.
  2. Stick to Verified apps — Look for the checkmark on Flathub.
  3. Avoid granting --filesystem=host unless the app absolutely requires it.

Quick Commands

# Install a Flatpak app
flatpak install flathub org.mozilla.firefox

# See what permissions an app has
flatpak override --show org.mozilla.firefox

# Revoke home folder access
sudo flatpak override --nofilesystem=home org.mozilla.firefox

# Install Flatseal (GUI permission manager)
flatpak install flathub com.github.tchx84.Flatseal

Pros and Cons

✅ Pros ❌ Cons
Strong sandbox by default First app is large (~700MB runtime)
Flathub verified badges Some apps request too many permissions
Shared runtimes save disk space Desktop-focused (not for servers)
Best permission control No built-in auto-updates
Works on all major distros  

Snap: Security That Depends on Your Distro

How It Works

Snap is Canonical's answer to universal packaging. It uses three security layers working together:

  • AppArmor — Restricts what the app can access on your filesystem.
  • seccomp — Limits which system calls the app can make (low-level OS interactions).
  • cgroups — Controls how much CPU and memory the app can use.

Snap packages are compressed into SquashFS images — they're never extracted to disk. When you run a Snap, it mounts the compressed image and runs from there. By default, snapd checks for updates 4 times a day in the background.

The Snap Store

The Snap Store (run by Canonical) performs automated checks and manual reviews before apps go live. You'll see verified publishers marked in the store.

The --classic Trap

This is the single biggest security risk with Snap.

Some apps require what's called "Classic Confinement" (--classic). When you see this flag during installation, it means the app runs outside the sandbox with full access to your system. Because classic confinement is such a wide-open door, Canonical requires developers to formally request and justify it before the Snap Store will publish it.

Apps like VS Code, Sublime Text, and various terminal-heavy developer tools use --classic because they need deep system integration — arbitrary file access, execution of host binaries — to function. That's understandable, but it means you're trusting the publisher completely.

# This runs INSIDE the sandbox (safe)
sudo snap install firefox

# This runs OUTSIDE the sandbox (risky)
sudo snap install code --classic

The Non-Ubuntu Warning

Snap's strict confinement depends heavily on AppArmor — and AppArmor isn't installed by default on every distro.

Distro AppArmor Status Snap Confinement
Ubuntu Pre-installed Full protection (as designed)
Fedora Uses SELinux instead Confinement can be incomplete
Arch Manual install required Profiles often incomplete

NixOS is a special case, and it's not really about weaker security — Snap mostly doesn't work there at all. Snap isn't included in nixpkgs upstream, and the core reason isn't a missing security module, it's architectural: Snap assumes a traditional FHS (Filesystem Hierarchy Standard) layout, with things like /snap and shared library paths in predictable places. NixOS deliberately doesn't use that layout — everything lives in the immutable /nix/store, addressed by content hash. That mismatch is the same reason plenty of non-Nix-packaged binaries need buildFHSUserEnv wrappers to run at all. If you're on NixOS, don't think of Snap as "available but weaker" — think of it as "not a supported path," and reach for nixpkgs, Flatpak, or an AppImage instead.

If you're running Snap on a non-Ubuntu distro that does use a standard FHS layout (Fedora, Arch, etc.), the sandboxing still functions, but it may be less complete than the AppArmor-native experience Ubuntu ships by default.

What You Should Do

  1. Check confinement mode — Always verify if a Snap uses "strict" (sandboxed) or "classic" (no sandbox) before installing.
  2. Avoid --classic unless necessary — If an app asks for classic confinement, ask yourself: do you trust this publisher? Do you need this specific app?
  3. Stick to verified publishers — Look for the checkmark in the Snap Store.
  4. Consider native packages first on non-Ubuntu distros — A regular .rpm or .pkg.tar.zst may be safer than a weakened Snap, and on NixOS, a proper nixpkgs derivation is usually your only realistic path anyway.

Quick Commands

# Install a Snap
sudo snap install firefox

# See what interfaces a Snap uses (its access permissions)
snap connections firefox

# Check if a Snap uses classic confinement
snap info code | grep confinement

# Revoke a permission (e.g., removable-media access)
sudo snap disconnect firefox:removable-media

Pros and Cons

✅ Pros ❌ Cons
Strong security on Ubuntu --classic bypasses sandbox entirely
Auto-updates (background) Effectively unsupported on NixOS; weaker confinement on non-FHS distros generally
Works for servers, IoT, CLI tools Proprietary Snap Store (Canonical-controlled)
Store vetting process Slowest startup speed
Supports system services and daemons Desktop theming is inconsistent

AppImage: Fast but Unprotected

How It Works

AppImage is the simplest approach: one app = one file. There's no install step, no daemon running in the background, and no app store. You download a file, make it executable, and run it.

chmod +x myapp.AppImage
./myapp.AppImage

That's it. No root access required. You can run it from a USB drive on any Linux machine with FUSE installed.

This makes AppImage incredibly portable — like a .exe file on Windows.

The Security Problem

AppImage has zero sandboxing by default. When you run an .AppImage file, it executes with the same permissions as your user account. That means it can:

  • Read your personal files
  • Access your SSH keys
  • Connect to the internet
  • Install software in your user directories
  • See your browser history

An AppImage is no different from running any other executable on your system. The only protection is where you download it from.

The Danger: Downloading from Unverified Sources

There is no AppImage "store" with security reviews. You download from websites, GitHub releases, or community pages. If you download from the wrong place, you're running arbitrary code on your system with full user permissions.

This isn't theoretical — malicious AppImages have appeared on unofficial download sites.

Adding Protection Manually

You can sandbox an AppImage, but it requires extra tools:

  • Firejail — A general-purpose sandboxing tool that can wrap AppImages
  • Bubblewrap — The same low-level technology Flatpak uses
  • aisap — A newer tool built specifically for AppImage sandboxing on top of bubblewrap, with a more recent POSIX-shell rewrite called SAS (Simple AppImage Sandboxing) gaining adoption in some AppImage-focused package managers

This is not beginner-friendly, but it's an option if you need both portability and security.

What You Should Do

  1. Only download from official developer sites — If the app's homepage has a releases page, that's where you get it.
  2. Verify checksums — Most developers publish SHA256 hashes alongside their files.
  3. Consider a sandboxing wrapper — If you run AppImages regularly, set one up once and use it consistently.
  4. For sensitive apps, prefer Flatpak or Snap — AppImage is best for simple, one-off tools.

Quick Commands

# Download from official source
wget https://developer.example.com/releases/myapp-1.0.AppImage

# Make it executable
chmod +x myapp-1.0.AppImage

# Run it
./myapp-1.0.AppImage

# (Optional) Sandboxed with Firejail
firejail --appimage ./myapp-1.0.AppImage

Pros and Cons

✅ Pros ❌ Cons
Fastest startup speed No sandboxing by default
No root access needed Full user-level access to your system
Truly portable (USB drive) No centralized app store or vetting
No daemon or background process No auto-updates
Great for one-off tools Desktop integration requires manual setup

Security Comparison at a Glance

Format Default Sandboxing Store Vetting Primary Security Risk
Flatpak High (bubblewrap) Yes (Flathub verified badges + automated build checks + human review) Overly permissive default flags (--filesystem=host)
Snap High on Ubuntu (AppArmor / seccomp) Yes (Canonical review pipeline) --classic mode bypasses sandbox; unreliable or unsupported off Ubuntu-like/FHS distros
AppImage None (runs natively) None (direct download) Zero isolation by default; relies 100% on source trust

If You Remember One Thing

Flatpak gives you the strongest default protection with the most control over what apps can access. Snap is equally strong on Ubuntu when apps use "strict" confinement, but its guarantees don't travel well to other distros, and effectively don't apply on NixOS at all. AppImage offers no protection at all, so trust and download source matter entirely.


Beyond Security: Quick Performance Notes

Security comes first, but here's how the formats compare on speed and disk usage:

Category Winner Notes
Startup speed AppImage Direct execution, no overhead
Disk efficiency at scale Flatpak Shared runtimes, no duplication
First app download size Snap Smaller initial footprint
Auto-updates Snap Background checks 4x/day

For most beginners, these differences are secondary. Pick the format that keeps you safe first, then worry about startup time.


Quick Command Cheat Sheet

Action Flatpak Snap AppImage
Install flatpak install flathub org.app.Name sudo snap install app-name chmod +x app.AppImage
Run flatpak run org.app.Name snap run app-name ./app.AppImage
Update flatpak update sudo snap refresh Re-download manually
Remove flatpak uninstall org.app.Name sudo snap remove app-name rm app.AppImage
Check permissions flatpak override --show org.app.Name snap connections app-name N/A (no sandbox)

Beginner Security Checklist

Keep this handy. Run through it every time you install something new:

  • [ ] Prefer Flatpak Verified apps (checkmark on Flathub)
  • [ ] Use Flatseal to review and tighten Flatpak permissions
  • [ ] Avoid Snap --classic unless you completely trust the publisher
  • [ ] Only download AppImages from official developer sites
  • [ ] Never run AppImages from random GitHub accounts or forums
  • [ ] Use Wayland over X11 for better keystroke isolation
  • [ ] Keep your system updated — security patches matter
  • [ ] Ask yourself: "Does this app really need access to my entire home folder?"

Conclusion

There is no single "best" universal packaging format. Each one has a sweet spot:

  • Flatpak is the safest default for desktop apps — strong sandboxing, verified publishers, and the best permission tools.
  • Snap shines on Ubuntu and Ubuntu-derived systems — just watch out for --classic mode, and don't expect it to work at all on NixOS.
  • AppImage offers unmatched portability — but security is entirely your responsibility.

Security is a shared responsibility. The format provides the tools; you make the choices. Pick verified apps, review permissions, and don't grant access an app doesn't need. That's how you stay safe on Linux — no matter which format you choose.


Further Reading: