Flatpak Command Reference

Version 1.2.5


Important

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

Executables
flatpak — Build, install and run applications and runtimes
Commands
flatpak build-bundle — Create a single-file bundle from a local repository
flatpak build-commit-from — Create new commits based on existing one (possibly from another repository)
flatpak build-export — Create a repository from a build directory
flatpak build-finish — Finalize a build directory
flatpak build-import-bundle — Import a file bundle into a local repository
flatpak build-init — Initialize a build directory
flatpak build-sign — Sign an application or runtime
flatpak build-update-repo — Create a repository from a build directory
flatpak build — Build in a directory
flatpak config — Manage configuration
flatpak create-usb — Copy apps and/or runtimes onto removable media.
flatpak document-export — Export a file to a sandboxed application
flatpak document-info — Show information about exported files
flatpak documents — List exported files
flatpak document-unexport — Stop exporting a file
flatpak enter — Enter an application
flatpak history — Show history
flatpak info — Show information about an installed application or runtime
flatpak install — Install an application or runtime
flatpak kill — Stop a running application
flatpak list — List installed applications and/or runtimes
flatpak make-current — Make a specific version of an app current
flatpak override — Override application requirements
flatpak permission-remove — List permissions
flatpak permissions — List permissions
flatpak permission-show — List permissions
flatpak permission-reset — Reset permissions
flatpak ps — Enumerate running instances
flatpak remote-add — Add a remote repository
flatpak remote-delete — Delete a remote repository
flatpak remote-info — Show information about an application or runtime in a remote
flatpak remote-ls — Show available runtimes and applications
flatpak remote-modify — Modify a remote repository
flatpak remotes — List remote repositories
flatpak repair — Repair a flatpak installation
flatpak repo — Show information about a local repository
flatpak run — Run an application or open a shell in a runtime
flatpak search — Search for applications and runtimes
flatpak uninstall — Uninstall an application or runtime
flatpak update — Update an application or runtime
flatpak spawn — Run commands in a sandbox
File Formats
flatpakrepo — Reference to a remote
flatpakref — Reference to a remote for an application or runtime
flatpak installation — Configuration for an installation location
flatpak metadata — Information about an application or runtime
flatpak remote — Configuration for a remote

Executables

Table of Contents

flatpak — Build, install and run applications and runtimes

Name

flatpak — Build, install and run applications and runtimes

Synopsis

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 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.

Options

The following global options are understood. Individual commands have their own options.

-h, --help

Show help options and exit.

-v, --verbose

Show debug information during command processing. Use -vv for more detail.

--ostree-verbose

Show OSTree debug information during command processing.

--version

Print version information and exit.

--default-arch

Print the default arch and exit.

--supported-arches

Print the supported arches in priority order and exit.

--gl-drivers

Print the list of active gl drivers and exit.

--installations

Print paths of system installations and exit.

Commands

Commands for managing installed applications and runtimes:

flatpak-install(1)

Install an application or a runtime from a remote or bundle.

flatpak-update(1)

Update an installed application or runtime.

flatpak-uninstall(1)

Uninstall an installed application or runtime.

flatpak-list(1)

List installed applications and/or runtimes.

flatpak-info(1)

Show information for an installed application or runtime.

flatpak-history(1)

Show history.

flatpak-config(1)

Manage flatpak configuration.

flatpak-repair(1)

Repair flatpak installation.

flatpak-create-usb(1)

Copy apps and/or runtimes onto removable media.

Commands for finding applications and runtimes:

flatpak-search(1)

Search for applications and runtimes.

Commands for running applications:

flatpak-run(1)

Run an application.

flatpak-kill(1)

Stop a running application.

flatpak-override(1)

Override permissions for an application.

flatpak-make-current(1)

Specify the default version to run.

flatpak-enter(1)

Enter the namespace of a running application.

Commands for managing file access:

flatpak-document-export(1)

Grant an application access to a specific file.

flatpak-document-unexport(1)

Revoke access to a specific file.

flatpak-document-info(1)

Show information about a specific file.

flatpak-documents(1)

List exported files.

Commands for managing the dynamic permission store:

flatpak-permission-remove(1)

Remove item from permission store.

flatpak-permissions(1)

List permissions.

flatpak-permission-show(1)

Show app permissions.

flatpak-permission-reset(1)

Reset app permissions.

Commands for managing remote repositories:

flatpak-remotes(1)

List all configured remote repositories.

flatpak-remote-add(1)

Add a new remote repository.

flatpak-remote-modify(1)

Modify properties of a configured remote repository.

flatpak-remote-delete(1)

Delete a configured remote repository.

flatpak-remote-ls(1)

List contents of a configured remote repository.

flatpak-remote-info(1)

Show information about a ref in a configured remote repository.

Commands for building applications:

flatpak-build-init(1)

Initialize a build directory.

flatpak-build(1)

Run a build command in a build directory.

flatpak-build-finish(1)

Finalizes a build directory for export.

flatpak-build-export(1)

Export a build directory to a repository.

flatpak-build-bundle(1)

Create a bundle file from a ref in a local repository.

flatpak-build-import-bundle(1)

Import a file bundle into a local repository.

flatpak-build-sign(1)

Sign an application or runtime after its been exported.

flatpak-build-update-repo(1)

Update the summary file in a repository.

flatpak-build-commit-from(1)

Create a new commit based on an existing ref.

flatpak-repo(1)

Print information about a repo.

Commands available inside the sandbox:

flatpak-spawn(1)

Run a command in another sandbox.

File formats

File formats that are used by Flatpak commands:

flatpak-flatpakref(5)

Reference to a remote for an application or runtime

flatpak-flatpakrepo(5)

Reference to a remote

flatpak-remote(5)

Configuration for a remote

flatpak-installation(5)

Configuration for an installation location

flatpak-metadata(5)

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_CONFIG_DIR

The location of flatpak site configuration. If this is not set, /etc/flatpak is used (unless overridden at build time by --sysconfdir).

Commands

Table of Contents

flatpak build-bundle — Create a single-file bundle from a local repository
flatpak build-commit-from — Create new commits based on existing one (possibly from another repository)
flatpak build-export — Create a repository from a build directory
flatpak build-finish — Finalize a build directory
flatpak build-import-bundle — Import a file bundle into a local repository
flatpak build-init — Initialize a build directory
flatpak build-sign — Sign an application or runtime
flatpak build-update-repo — Create a repository from a build directory
flatpak build — Build in a directory
flatpak config — Manage configuration
flatpak create-usb — Copy apps and/or runtimes onto removable media.
flatpak document-export — Export a file to a sandboxed application
flatpak document-info — Show information about exported files
flatpak documents — List exported files
flatpak document-unexport — Stop exporting a file
flatpak enter — Enter an application
flatpak history — Show history
flatpak info — Show information about an installed application or runtime
flatpak install — Install an application or runtime
flatpak kill — Stop a running application
flatpak list — List installed applications and/or runtimes
flatpak make-current — Make a specific version of an app current
flatpak override — Override application requirements
flatpak permission-remove — List permissions
flatpak permissions — List permissions
flatpak permission-show — List permissions
flatpak permission-reset — Reset permissions
flatpak ps — Enumerate running instances
flatpak remote-add — Add a remote repository
flatpak remote-delete — Delete a remote repository
flatpak remote-info — Show information about an application or runtime in a remote
flatpak remote-ls — Show available runtimes and applications
flatpak remote-modify — Modify a remote repository
flatpak remotes — List remote repositories
flatpak repair — Repair a flatpak installation
flatpak repo — Show information about a local repository
flatpak run — Run an application or open a shell in a runtime
flatpak search — Search for applications and runtimes
flatpak uninstall — Uninstall an application or runtime
flatpak update — Update an application or runtime
flatpak spawn — Run commands in a sandbox

Name

flatpak-build-bundle — Create a single-file bundle from a local repository

Synopsis

flatpak build-bundle [OPTION...] LOCATION FILENAME NAME [BRANCH]

Description

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.

Options

The following options are understood:

-h, --help

Show help options and exit.

--runtime

Export a runtime instead of an application.

--arch=ARCH

The arch to create a bundle for.

--repo-url=URL

The 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=FILE

Add the GPG key from FILE (use - for stdin).

--g