flatpak flatpak Developer Alexander Larsson alexl@redhat.com flatpak 1 flatpak Build, install and run applications and runtimes flatpak OPTION COMMAND Description 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 are used on, and they are isolated from the host system ('sandboxed') to some degree, at runtime. Flatpak can operate in system-wide or per-user mode. The system-wide data (runtimes, applications and configuration) is located in $prefix/var/lib/flatpak/, and the per-user data is in $HOME/.local/share/flatpak/. Below these locations, there is a local repository in the repo/ subdirectory and installed runtimes and applications are in the corresponding runtime/ and app/ subdirectories. System-wide remotes can be statically preconfigured by dropping flatpakrepo files into /etc/flatpak/remotes.d/. In addition to 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. 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. 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-builder1 tool. Flatpak supports installing from sideload repos. These are partial copies of a repository (generated by flatpak create-usb) that are used as 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). 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. Options The following global options are understood. Individual commands have their own options. Show help options and exit. Show debug information during command processing. Use -vv for more detail. Show OSTree debug information during command processing. Print version information and exit. Print the default arch and exit. Print the supported arches in priority order and exit. Print the list of active gl drivers and exit. Print paths of system installations and exit. Commands Commands for managing installed applications and runtimes: flatpak-install1 Install an application or a runtime from a remote or bundle. flatpak-update1 Update an installed application or runtime. flatpak-uninstall1 Uninstall an installed application or runtime. flatpak-mask1 Mask out updates and automatic installation flatpak-list1 List installed applications and/or runtimes. flatpak-info1 Show information for an installed application or runtime. flatpak-history1 Show history. flatpak-config1 Manage flatpak configuration. flatpak-repair1 Repair flatpak installation. flatpak-create-usb1 Copy apps and/or runtimes onto removable media. Commands for finding applications and runtimes: flatpak-search1 Search for applications and runtimes. Commands for running applications: flatpak-run1 Run an application. flatpak-kill1 Stop a running application. flatpak-override1 Override permissions for an application. flatpak-make-current1 Specify the default version to run. flatpak-enter1 Enter the namespace of a running application. Commands for managing file access: flatpak-document-export1 Grant an application access to a specific file. flatpak-document-unexport1 Revoke access to a specific file. flatpak-document-info1 Show information about a specific file. flatpak-documents1 List exported files. Commands for managing the dynamic permission store: flatpak-permission-remove1 Remove item from permission store. flatpak-permissions1 List permissions. flatpak-permission-show1 Show app permissions. flatpak-permission-reset1 Reset app permissions. flatpak-permission-set1 Set app permissions. Commands for managing remote repositories: flatpak-remotes1 List all configured remote repositories. flatpak-remote-add1 Add a new remote repository. flatpak-remote-modify1 Modify properties of a configured remote repository. flatpak-remote-delete1 Delete a configured remote repository. flatpak-remote-ls1 List contents of a configured remote repository. flatpak-remote-info1 Show information about a ref in a configured remote repository. Commands for building applications: flatpak-build-init1 Initialize a build directory. flatpak-build1 Run a build command in a build directory. flatpak-build-finish1 Finalizes a build directory for export. flatpak-build-export1 Export a build directory to a repository. flatpak-build-bundle1 Create a bundle file from a ref in a local repository. flatpak-build-import-bundle1 Import a file bundle into a local repository. flatpak-build-sign1 Sign an application or runtime after its been exported. flatpak-build-update-repo1 Update the summary file in a repository. flatpak-build-commit-from1 Create a new commit based on an existing ref. flatpak-repo1 Print information about a repo. Commands available inside the sandbox: flatpak-spawn1 Run a command in another sandbox. File formats File formats that are used by Flatpak commands: flatpak-flatpakref5 Reference to a remote for an application or runtime flatpak-flatpakrepo5 Reference to a remote flatpak-remote5 Configuration for a remote flatpak-installation5 Configuration for an installation location flatpak-metadata5 Information about an application or runtime Environment Besides standard environment variables such as XDG_DATA_DIRS and XDG_DATA_HOME, flatpak is consulting some of its own. FLATPAK_USER_DIR The location of the per-user installation. If this is not set, $XDG_DATA_HOME/flatpak is used. 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 --with-system-install-dir). 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_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_RUN_DIR The location of flatpak runtime global files. If this is not set, /run/flatpak is used. See also ostree1, ostree.repo5, flatpak-remote5, flatpak-installation5, https://www.flatpak.org