FLATPAK(1)

๐Ÿ’– FLATPAK(1) ๐Ÿ’–

okay bestie, welcome to the flatpak manual, it's giving the tool for building, installing and running applications and runtimes and we're gonna get into all of it ๐Ÿ’…


โœจ NAME โœจ

flatpak โ€” Build, install and run applications and runtimes ๐Ÿซถ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

flatpak [OPTION...] {COMMAND}

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So like, Flatpak is a tool for managing applications and the runtimes they use. In the Flatpak model, applications can be built and distributed independently from the host system they're used on, and at runtime they're isolated from the host system ('sandboxed') to some degree. Iconic behaviour honestly โœจ

Flatpak can operate in system-wide or per-user mode. The system-wide data (runtimes, applications and configuration) lives in $prefix/var/lib/flatpak/, and the per-user data lives in $HOME/.local/share/flatpak/. Below these locations, there's a local repository in the repo/ subdirectory, and installed runtimes and applications are in the corresponding runtime/ and app/ subdirectories. Organized. We love a filesystem with a system ๐Ÿ’…

System-wide remotes can be statically preconfigured by dropping flatpakrepo(5) files into /usr/share/flatpak/remotes.d/ and /etc/flatpak/remotes.d/. If a file with the same name exists in both, the file under /etc takes precedence. /etc said main character energy, no cap ๐Ÿ‘‘

On top of the system-wide installation in $prefix/var/lib/flatpak/ โ€” which is always considered the default one unless overridden โ€” more system-wide installations can be defined via configuration files in /etc/flatpak/installations.d/, which must define at least the id of the installation and the absolute path to it. Other optional parameters like DisplayName, Priority or StorageType are also supported. Flexible fr fr ๐ŸŒˆ

Flatpak uses OSTree to distribute and deploy data. The repositories it uses are OSTree repositories and can be manipulated with the ostree utility. Installed runtimes and applications are OSTree checkouts. Cute little checkouts, obsessed ๐ŸŽ€

Basic commands for building flatpaks such as build-init, build and build-finish are included in the flatpak utility. For higher-level build support, see the separate flatpak-builder(1) tool. That's a whole other girlie โœจ

Flatpak supports installing from sideload repos. These are partial copies of a repository (generated by flatpak create-usb) that are used as an installation source when offline (and online as a performance improvement). Such repositories are configured by creating symlinks to the sideload sources in the sideload-repos subdirectory of the installation directory (i.e. typically /var/lib/flatpak/sideload-repos or ~/.local/share/flatpak/sideload-repos). Additionally, symlinks can be created in /run/flatpak/sideload-repos, which is a better location for non-persistent sources (as it is cleared on reboot ๐Ÿ™ˆ). These symlinks can point to either the directory given to flatpak create-usb โ€” which by default writes to the subpath .ostree/repo โ€” or directly to an ostree repo. Links on links, it's giving web ๐Ÿ•ธ๏ธ


๐Ÿ’– OPTIONS ๐Ÿ’–

The following global options are understood. Individual commands have their own options, so don't come for me when flatpak run has extra flags, okay? ๐Ÿ˜Œ

  • -h, --help โ€” Show help options and exit. The classic "help meeee" button ๐Ÿซถ
  • -v, --verbose โ€” Show debug information during command processing. Use -vv for more detail. Yes bestie, double it up for the extra tea ๐Ÿต
  • --ostree-verbose โ€” Show OSTree debug information during command processing. Deep lore mode activated ๐Ÿ”ฅ
  • --version โ€” Print version information and exit. Vibe check: what flatpak are we even running ๐Ÿ’…
  • --default-arch โ€” Print the default arch and exit.
  • --supported-arches โ€” Print the supported arches in priority order and exit. Priority order, periodt ๐Ÿ“‹
  • --gl-drivers โ€” Print the list of active gl drivers and exit.
  • --installations โ€” Print paths of system installations and exit. Show me the real estate ๐Ÿ 
  • --print-system-only โ€” When the flatpak --print-updated-env command is run, only print the environment for system flatpak installations, not including the user's home installation. System girlies only, no home energy ๐Ÿ’€
  • --print-updated-env โ€” Print the set of environment variables needed to use flatpaks, amending the current set of environment variables. This is intended to be used in a systemd environment generator, and should not need to be run manually.
โš ๏ธ That last one is literally built for systemd to call on your behalf, bestie. It should not need to be run manually โ€” so unless you know exactly why you're here, step away from the terminal ๐Ÿ™ˆ

๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

๐Ÿ“ Commands for managing installed applications and runtimes

  • flatpak-install(1) โ€” Install an application or a runtime from a remote or bundle. New app drop, slay โœจ
  • flatpak-update(1) โ€” Update an installed application or runtime. Glow up time ๐ŸŒธ
  • flatpak-uninstall(1) โ€” Uninstall an installed application or runtime. We're letting her go ๐Ÿ˜ญ
  • flatpak-mask(1) โ€” Mask out updates and automatic installation. Not today, updates ๐Ÿšซ
  • flatpak-pin(1) โ€” Pin runtimes to prevent automatic removal. Pinned like a bestie's message ๐Ÿ“Œ
  • flatpak-list(1) โ€” List installed applications and/or runtimes.
  • flatpak-info(1) โ€” Show information for an installed application or runtime. Tell me everything ๐Ÿ”
  • flatpak-history(1) โ€” Show history. The lore of your installs ๐Ÿ“œ
  • flatpak-config(1) โ€” Manage flatpak configuration.
  • flatpak-repair(1) โ€” Repair flatpak installation. She's in her healing era ๐Ÿฉน
  • flatpak-create-usb(1) โ€” Copy apps and/or runtimes onto removable media. USB said let me carry the whole app ๐Ÿ’พ

๐ŸŒˆ Commands for finding applications and runtimes

  • flatpak-search(1) โ€” Search for applications and runtimes. Detective mode ๐Ÿ”Ž

๐Ÿฆ‹ Commands for managing running applications

  • flatpak-run(1) โ€” Run an application. The whole point honestly ๐Ÿš€
  • flatpak-kill(1) โ€” Stop a running application. She's done ๐Ÿ’€
  • flatpak-override(1) โ€” Override permissions for an application. Setting boundaries, we love to see it ๐Ÿ’…
  • flatpak-make-current(1) โ€” Specify the default version to run.
  • flatpak-enter(1) โ€” Enter the namespace of a running application. Sneaking into the sandbox like it's a party ๐ŸŽ‰

๐ŸŽ€ Commands for managing file access

๐Ÿ’œ Commands for managing the dynamic permission store

โญ Commands for managing remote repositories

๐Ÿ”ฅ Commands for building applications

๐Ÿ’… Commands available inside the sandbox

  • flatpak-spawn(1) โ€” Run a command in another sandbox. Jumping between sandboxes like it's nothing ๐Ÿงš

๐ŸŒธ FILE FORMATS ๐ŸŒธ

File formats that are used by Flatpak commands:


๐ŸŒธ ENVIRONMENT ๐ŸŒธ

okay so besides the standard environment variables such as XDG_DATA_DIRS and XDG_DATA_HOME, flatpak also consults some of its own. yes bestie, it has opinions. ๐Ÿ’…

  • FLATPAK_BINARY โ€” path to the flatpak executable that will be written into exported .desktop files and scripts when an app is installed. the default is /usr/bin/flatpak, unless it was overridden at build time by --bindir. โœจ
  • FLATPAK_BWRAP โ€” path to the bwrap(1) executable that will be used to create the sandbox. depending on how Flatpak was configured at build-time, the default is either to search the PATH, or to use a vendored copy which is normally installed as /usr/libexec/flatpak-bwrap. ๐Ÿซถ
  • FLATPAK_CONFIG_DIR โ€” the location of flatpak site configuration. if this is not set, /etc/flatpak is used (unless overridden at build time by --sysconfdir). ๐ŸŽ€
  • FLATPAK_DATA_DIR โ€” the location of Flatpak's OS-level defaults and integration hooks. if this is not set, /usr/share/flatpak is used, unless overridden at build time by --datadir. ๐ŸŒธ
  • FLATPAK_DBUSPROXY โ€” path to the xdg-dbus-proxy(1) executable that will be used to filter D-Bus traffic between the sandbox and the host system. depending on how Flatpak was configured at build-time, the default is either to search the PATH, or to use a vendored copy which is normally installed as /usr/libexec/flatpak-dbus-proxy. ๐Ÿฆ‹
  • FLATPAK_DOWNLOAD_TMPDIR โ€” path to a directory that will be used temporarily when downloading OCI layers, and potentially for other downloads in future. the standard TMPDIR is not used for this, because Flatpak apps are frequently too large to fit on a tmpfs. ๐Ÿ˜ญ
  • FLATPAK_FANCY_OUTPUT โ€” may be set to 0 to avoid fancy formatting when outputting to a terminal. this feature is also disabled automatically when standard output is not a terminal, or when G_MESSAGES_DEBUG is set. ๐Ÿ’€
  • FLATPAK_FORCE_TEXT_AUTH โ€” may be set to 1 to force use of a simple built-in polkit(8) agent when authentication is required to modify the system-wide installation. by default, the desktop environment's polkit agent is used, if one is available, usually resulting in a graphical prompt. ๐Ÿ”
  • FLATPAK_GL_DRIVERS โ€” a colon-separated list of graphics driver extensions to try to use for OpenGL, Vulkan and similar APIs, most-preferred first. the default is to select a graphics driver automatically. values in this list match the last dot-separated component of the names of extensions with the active-gl-driver condition. typical values are default, mesa-git or nvidia-550-120 (replacing the version number by the major and minor version of the nvidia kernel module). ๐ŸŒˆ
  • FLATPAK_RUN_DIR โ€” the location of flatpak runtime global files. if this is not set, /run/flatpak is used. โญ
  • FLATPAK_SYSTEM_CACHE_DIR โ€” the location where temporary child repositories will be created during pulls into the system-wide installation. if this is not set, a directory in /var/tmp/ is used. this is useful because it is more likely to be on the same filesystem as the system repository (thus increasing the chances for e.g. reflink copying), and we can avoid filling the user's home directory with temporary data. ๐Ÿ’–
  • FLATPAK_SYSTEM_DIR โ€” the location of the default system-wide installation. if this is not set, /var/lib/flatpak is used (unless overridden at build time by --localstatedir or -Dsystem_install_dir). ๐Ÿ‘‘
  • FLATPAK_TTY_PROGRESS โ€” may be set to 0 to disable reporting machine-readable progress to the terminal. this feature can be disabled because it uses the OSC 9;4 sequence, which some terminal emulators interpret as a popup notification. ๐Ÿ™ˆ
  • FLATPAK_USER_DIR โ€” the location of the per-user installation. if this is not set, $XDG_DATA_HOME/flatpak is used. ๐Ÿ“

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

go read these next, bestie, they're iconic:

mwah ๐Ÿ’‹ โ€” this was flatpak ๐Ÿ’– FLATPAK(1) ๐Ÿ’…, and the date is whatever your local manpage footer says. go forth and sandbox slay. ๐ŸŒˆ

๐Ÿ“ฆ where this page comes from