The command reference is generated from the flatpak repo; see https://github.com/flatpak/flatpak/tree/master/doc
Flatpak comes with a rich commandline interface.
Table of Contents
Table of Contents
flatpak — Build, install and run applications and runtimes
flatpak [OPTION...] {COMMAND}
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
config fragments 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 buiding 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.
The following global options are understood. Individual commands have their own options.
-h, --helpShow help options and exit.
-v, --verboseShow debug information during command processing. Use -vv for more detail.
--ostree-verboseShow OSTree debug information during command processing.
--versionPrint version information and exit.
--default-archPrint the default arch and exit.
--supported-archesPrint the supported arches in priority order and exit.
--gl-driversPrint the list of active gl drivers and exit.
--installationsPrint paths of system installations and exit.
Commands for managing installed applications and runtimes:
Install an application or a runtime from a remote or bundle.
Update an installed application or runtime.
Uninstall an installed application or runtime.
List installed applications and/or runtimes.
Show information for an installed application or runtime.
Show history.
Manage flatpak configuration.
Repair flatpak installation.
Copy apps and/or runtimes onto removable media.
Commands for finding applications and runtimes:
Search for applications and runtimes.
Commands for running applications:
Run an application.
Stop a running application.
Override permissions for an application.
Specify the default version to run.
Enter the namespace of a running application.
Commands for managing file access:
Grant an application access to a specific file.
Revoke access to a specific file.
Show information about a specific file.
List exported files.
Commands for managing the dynamic permission store:
Remove item from permission store.
List permissions.
Show app permissions.
Reset app permissions.
Commands for managing remote repositories:
List all configured remote repositories.
Add a new remote repository.
Modify properties of a configured remote repository.
Delete a configured remote repository.
List contents of a configured remote repository.
Show information about a ref in a configured remote repository.
Commands for building applications:
Initialize a build directory.
Run a build command in a build directory.
Finalizes a build directory for export.
Export a build directory to a repository.
Create a bundle file from a ref in a local repository.
Import a file bundle into a local repository.
Sign an application or runtime after its been exported.
Update the summary file in a repository.
Create a new commit based on an existing ref.
Print information about a repo.
Commands available inside the sandbox:
Run a command in another sandbox.
File formats that are used by Flatpak commands:
Reference to a remote for an application or runtime
Reference to a remote
Configuration for a remote
Configuration for an installation location
Information about an application or runtime
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_CONFIG_DIR
The location of flatpak site configuration. If this is not set,
/etc/flatpak is used (unless overridden at build
time by --sysconfdir).
Table of Contents
flatpak-build-bundle — Create a single-file bundle from a local repository
flatpak build-bundle [OPTION...] LOCATION FILENAME NAME [BRANCH]
Creates a single-file named FILENAME for the application (or runtime) named NAME in the repository at LOCATION . If a BRANCH is specified, this branch of the application is used.
The collection ID set on the repository at LOCATION (if set) will be used for the bundle.
The format of the bundle file is that of an ostree static delta (against an empty base) with some flatpak specific metadata for the application icons and appdata.
The following options are understood:
-h, --helpShow help options and exit.
--runtimeExport a runtime instead of an application.
--arch=ARCHThe arch to create a bundle for.
--repo-url=URLThe URL for the repository from which the application can be updated. Installing the bundle will automatically configure a remote for this URL.
--runtime-repo=URL
The URL for a .flatpakrepo file that contains
the information about the repository that supplies
the runtimes required by the app.
--gpg-keys=FILEAdd the GPG key from FILE (use - for stdin).
--g