Skip to main content

🧩 Lesson 5.2: Snap, Flatpak, AppImage, and PPAs

apt is great — but sometimes the software you want isn't in the default repos. Here's how to get it anyway.

🎯 Learning Objectives

  • Understand why alternative package formats exist
  • Install, manage, and remove Snap packages
  • Install and manage Flatpak applications
  • Run AppImage applications
  • Add and remove PPAs (Personal Package Archives)
  • Know when to use each format

Estimated Time: 35 minutes

📑 In This Lesson

Why Not Just apt?

Ubuntu's default repositories are huge, but they can't cover everything:

  • Newer versions — repos often have older, "stable" versions; you may want the latest release
  • Proprietary software — apps like Spotify, Slack, and Discord aren't in the default repos
  • Cross-distro apps — developers want to ship one package that works on Ubuntu, Fedora, Arch, etc.
  • Sandboxing — some formats isolate apps for better security
graph TD A["Want to install software?"] --> B{"In default apt repos?"} B -->|"Yes"| C["sudo apt install"] B -->|"No"| D{"Developer provides..."} D -->|"Snap"| E["snap install"] D -->|"Flatpak"| F["flatpak install"] D -->|"AppImage"| G["Download & run"] D -->|"PPA"| H["Add repo, then apt install"] style A fill:#3b82f6,stroke:#2563eb,color:#fff style C fill:#22c55e,stroke:#166534,color:#fff style E fill:#6366f1,stroke:#4338ca,color:#fff style F fill:#f59e0b,stroke:#b45309,color:#fff style G fill:#ec4899,stroke:#be185d,color:#fff style H fill:#14b8a6,stroke:#0f766e,color:#fff

Snap

Snap is Canonical's (Ubuntu's parent company) universal package format. Snap packages are self-contained — they bundle the app and all its dependencies into a single file. Ubuntu comes with Snap pre-installed.

Basic Snap Commands

# Search for a snap
snap find vlc

# Install a snap
sudo snap install vlc

# List installed snaps
snap list

# Get info about a snap
snap info vlc

# Update all snaps
sudo snap refresh

# Update a specific snap
sudo snap refresh vlc

# Remove a snap
sudo snap remove vlc

Snap Channels

Snaps can be installed from different channels — think of them as release tracks:

# Install from the edge (bleeding-edge) channel
sudo snap install firefox --channel=edge

# Switch an installed snap to a different channel
sudo snap switch firefox --channel=stable
sudo snap refresh firefox
ChannelStabilityUse Case
stableMost testedDefault — everyday use
candidateRelease candidateTesting before stable
betaFeature-complete but buggyEarly adopters
edgeLatest codeDevelopers and testers

⚠️ Snap Quirks

  • Slower startup — snaps can take a moment to launch the first time (they're decompressed at runtime)
  • Disk space — each snap bundles its own dependencies, so they're larger than apt packages
  • Auto-updates — snaps update automatically (you can configure this but not disable it entirely)
  • Sandboxing — snaps run in a confined environment; some may have trouble accessing files outside their sandbox

Flatpak

Flatpak is a community-driven, distro-independent package format. It's the main alternative to Snap and is the default on Fedora, Linux Mint, and many other distros.

Setting Up Flatpak on Ubuntu

# Install Flatpak
sudo apt install flatpak

# Add the Flathub repository (the main Flatpak app store)
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

# Restart your system (or log out and back in) for full integration

Using Flatpak

# Search for an app
flatpak search gimp

# Install from Flathub
flatpak install flathub org.gimp.GIMP

# Run a Flatpak app
flatpak run org.gimp.GIMP

# List installed Flatpak apps
flatpak list

# Update all Flatpak apps
flatpak update

# Remove a Flatpak app
flatpak uninstall org.gimp.GIMP

# Remove unused runtimes (shared libraries)
flatpak uninstall --unused

💡 Flatpak App IDs

Flatpak uses reverse-domain naming like org.gimp.GIMP. You don't need to memorize these — flatpak search shows them, and tab completion helps. After installation, apps also appear in your desktop's application menu with normal names.

🐧 Flathub

Flathub (flathub.org) is the main Flatpak repository. It hosts thousands of apps — both open-source and proprietary. You can browse it online to see what's available before installing anything.

AppImage

AppImage is the simplest approach: a single, self-contained file that you download and run. No installation, no root, no package manager. Think of it as a portable app — like a .exe that doesn't need to be installed.

Using an AppImage

# Step 1: Download the AppImage (example: Obsidian)
# Usually from the app's official website

# Step 2: Make it executable
chmod +x Obsidian-1.5.0.AppImage

# Step 3: Run it
./Obsidian-1.5.0.AppImage

Organizing AppImages

# Create a directory for your AppImages
mkdir -p ~/Applications

# Move downloaded AppImages there
mv ~/Downloads/Obsidian-1.5.0.AppImage ~/Applications/

# Run from the organized location
~/Applications/Obsidian-1.5.0.AppImage

✅ AppImage Pros

  • No installation required — just download and run
  • No root/sudo needed
  • Doesn't modify your system
  • Easy to try out new apps — just delete the file to "uninstall"
  • Portable — can run from a USB drive

⚠️ AppImage Cons

  • No automatic updates — you have to re-download manually
  • No desktop integration by default (no app menu entry, no file associations)
  • Each AppImage bundles everything, so they can be large
  • Security is your responsibility — there's no centralized review process

💡 AppImage Desktop Integration

You can install appimaged or AppImageLauncher to automatically add AppImages to your application menu and handle updates. These are optional quality-of-life tools.

PPAs (Personal Package Archives)

A PPA is a custom repository hosted on Launchpad (Ubuntu's development platform). Software developers use PPAs to distribute newer versions of their packages or software that isn't in the official repos.

Adding and Using a PPA

# Step 1: Add the PPA
sudo add-apt-repository ppa:developer/ppa-name

# Step 2: Update package index (happens automatically on modern Ubuntu)
sudo apt update

# Step 3: Install the package
sudo apt install package-name

Real-World Example

# Example: Install the latest version of a popular tool via PPA
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-driver-550

Removing a PPA

# Remove the PPA (keeps installed packages at their current version)
sudo add-apt-repository --remove ppa:developer/ppa-name

# Or remove and revert packages to official repo versions
sudo apt install ppa-purge
sudo ppa-purge ppa:developer/ppa-name

# List all configured PPAs
grep -r "^deb " /etc/apt/sources.list.d/

🔴 PPA Security Warning

PPAs are maintained by individuals or small teams — not by Ubuntu. A malicious PPA could install compromised software on your system. Only add PPAs from developers or organizations you trust. When in doubt, check the PPA's Launchpad page to see who maintains it and how popular it is.

🐧 Fedora / Arch Equivalent

PPAs are Ubuntu-specific. Fedora users have COPR (Community Projects) for a similar concept. Arch users have the AUR (Arch User Repository) — a massive community-maintained collection of build scripts.

Comparison Chart

Feature apt Snap Flatpak AppImage PPA
Pre-installed on Ubuntu N/A
Auto-updates Manual ✅ Automatic Manual Via apt
Sandboxed
Works across distros Debian-only Most Most Most Ubuntu-only
Needs root to install Yes Yes Yes* No Yes
Disk usage Small Larger Larger Larger Small
Startup speed Fast Slower Good Good Fast

* Flatpak can do user-level installs with --user, but system-level install is the default.

✅ When to Use What

  • apt — your default choice; use whenever the package is available in the official repos
  • Snap — good for desktop apps, especially proprietary ones (Spotify, Slack); already on Ubuntu
  • Flatpak — great for desktop apps; preferred by many community distros; browse Flathub
  • AppImage — when you want to try something without installing it, or need portability
  • PPA — when you need a newer version of a specific package that's in the official repos

Exercises

🏋️ Exercise 1: Explore Snaps

  1. List snaps already on your system: snap list
  2. Search for a media player: snap find media player
  3. View info on a snap: snap info vlc
  4. Check which snaps have pending updates: snap refresh --list

🏋️ Exercise 2: Set Up Flatpak

  1. Install Flatpak: sudo apt install -y flatpak
  2. Add Flathub: flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
  3. Search for an app: flatpak search calculator
  4. List installed Flatpaks: flatpak list

Note: You may need to restart your session for full desktop integration.

🏋️ Exercise 3: AppImage Practice

  1. Create an Applications directory: mkdir -p ~/Applications
  2. Download any AppImage from appimage.github.io
  3. Make it executable: chmod +x ~/Downloads/SomeApp.AppImage
  4. Run it: ~/Downloads/SomeApp.AppImage
  5. "Uninstall" it: rm ~/Downloads/SomeApp.AppImage

🏋️ Exercise 4: Check Your Sources

# See all your apt sources
cat /etc/apt/sources.list

# See any additional repositories (PPAs, etc.)
ls /etc/apt/sources.list.d/

# See all added PPAs
grep -r "^deb " /etc/apt/sources.list.d/ 2>/dev/null

Knowledge Check

❓ Question 1

Which package format requires NO installation — just download and run?

❓ Question 2

Which format auto-updates by default on Ubuntu?

❓ Question 3

What's the main risk of adding a PPA?

❓ Question 4

Where do most Flatpak applications come from?

Summary

🎉 Key Takeaways

  • Snap — pre-installed on Ubuntu, auto-updates, sandboxed, great for desktop apps
  • Flatpak — community-driven, browse Flathub, works across distros
  • AppImage — no install needed, just download → chmod +x → run; delete to remove
  • PPA — adds third-party apt repos; useful for newer package versions but requires trust
  • Default to apt when possible — use alternatives when the software isn't available in the official repos

🍎 Mac Equivalents

macOS doesn't have Snap, Flatpak, or AppImage. The Mac ecosystem uses:

  • Homebrew Caskbrew install --cask firefox installs GUI apps (like Snap/Flatpak for Mac)
  • .dmg files — disk images you open, drag the app to Applications, then eject (like AppImage but with an install step)
  • Mac App Store — Apple's sandboxed app store (similar in concept to Snap Store)
  • Homebrew taps — third-party formula repositories (similar to PPAs)

🎉 Module 5 Complete!

You now know how to install software from any source on Linux — official repos, Snap, Flatpak, AppImage, or PPAs. Next up: keeping your running system healthy.

🚀 What's Next?

Module 6 covers System Administration — managing processes, checking disk space and system info, and controlling services.