What you will achieve
Understand Flatpak vs Snap on desktop Linux — sandboxed apps, update cadence, and when to prefer native apt/dnf packages on servers.
1) Flatpak (Flathub)
sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.mozilla.firefox
flatpak list
2) Snap (Ubuntu-centric)
snap list
sudo snap install chromium
Snap ships default on Ubuntu desktop; other distros need snapd package.
3) Compare
- Flatpak — user installs, XDG portals, common on Fedora.
- Snap — central store, automatic updates, sometimes slower cold start.
- Servers — stick to apt/dnf; avoid snap services on headless unless required.
Verify
flatpak info org.mozilla.firefox
snap info chromium
5) Flatpak permissions
flatpak info --show-permissions org.mozilla.firefox
flatpak override --user org.mozilla.firefox --filesystem=home
6) Snap channels
snap info firefox
sudo snap install firefox --channel=esr/stable
7) Disk usage
du -sh ~/.var/app
du -sh /var/lib/snapd/snaps
Server stance
On production servers, avoid snapd daemon overhead. Flatpak similarly targets desktop. Use distro packages or containers for services.
8) portal and theming
Flatpak apps use host GTK theme via portals — missing org.gnome.Platform runtime version causes odd UI on older hosts.
Prerequisites
Desktop Linux with user session. Flatpak: flathub remote. Snap: snapd installed and socket active. Disk space — snaps are larger. XDG desktop portal for Wayland integration.
List runtimes
flatpak list --runtime
snap list
snap refresh hold
sudo snap refresh --hold firefoxPin snap revision during regression — release hold when fixed build ships.
CI/CD desktop builds
Flatpak build-bundle for offline install — flatpak build-bundle creates single file for airgapped machines without flathub access during install.
enterprise proxy
export http_proxy=http://proxy.corp:8080flatpak remote-add and snap install need proxy env in corporate networks — document for desktop rollout scripts.
remove unused runtimes
flatpak uninstall --unused
snap list --all | awk '/disabled/{print $1, $3}'Reclaim gigabytes after removing flatpak apps leaving orphaned runtimes.
snap classic confinement
--classic bypasses sandbox for IDEs needing full filesystem — understand security trade before classic install on machine with SSH keys and customer data.
xdg-desktop-portal-gtk
sudo apt install xdg-desktop-portal-gtkFile picker in flatpak apps on GNOME needs portal — missing package causes save dialog failures.
flatpak override --reset
Undo bad permission override during troubleshooting — returns app to default sandbox.
Pin app revision
flatpak update --commit=HASH app pins known-good build — rollback when Flathub ships regression until fixed upstream.
Bandwidth on first update
Initial flatpak update on fresh install downloads hundreds of MB of runtimes — schedule on uncapped connection; snap similarly pulls core snaps before application snaps.