Flatpak Command Reference

Version 0.8.9


Flatpak comes with a rich commandline interface.

Table of Contents

flatpak install — Install an application or runtime
flatpak update — Update an application or runtime
flatpak uninstall — Uninstall an application or runtime
flatpak list — List installed applications and/or runtimes
flatpak info — Show information about installed application and/or runtime
flatpak run — Run an application
flatpak override — Override application requirements
flatpak enter — Enter an application
flatpak document-export — Export a file to a sandboxed application
flatpak document-unexport — Stop exporting a file
flatpak document-info — Show information about exported files
flatpak document-list — List exported files
flatpak remote-add — Add a remote repository
flatpak remote-modify — Modify a remote repository
flatpak remote-delete — Delete a remote repository
flatpak remote-list — List remote repositories
flatpak remote-ls — Show available runtimes and applications
flatpak build-init — Initialize a build directory
flatpak build — Build in a directory
flatpak build-finish — Finalize a build directory
flatpak build-export — Create a repository from a build directory
flatpak build-bundle — Create a single-file bundle from a local repository
flatpak build-import-bundle — Import a file bundle into a local repository
flatpak build-update-repo — Create a repository from a build directory
flatpak build-sign — Sign an application or runtime
flatpak-builder — Help build application dependencies
flatpak metadata — Information about an application or runtime
flatpakrepo — Reference to a remote
flatpakref — Reference to a remote for an application or runtime
flatpak make-current — Make a specific version of an app current

Name

flatpak-install — Install an application or runtime

Synopsis

Install from a configured remote:

flatpak install [OPTION...] REMOTE-NAME REF...

Install from a .flatpakref file:

flatpak install [OPTION...] [--from] LOCATION

Install from a .flatpak bundle:

flatpak install [OPTION...] [--bundle] FILENAME

Install from an OCI registry:

flatpak install [OPTION...] --oci LOCATION [TAG]

Description

Installs an application or runtime. The primary way to install is to specify a [REMOTE] name as the source and one ore more [REF]s to specify the application or runtime to install.

Each REF argument is a full or partial indentifier in the flatpak ref format, which looks like "(app|runtime)/ID/ARCH/BRANCH". All elements except ID are optional and can be left out, including the slashes, so most of the time you need only specify ID. Any part left out will be matched against what is in the remote, and if there are multiple matches an error message will list the alternatives.

By default this looks for both apps and runtime with the given REF in the specified REMOTE , but you can limit this by using the --app or --runtime option, or by supplying the initial element in the REF.

The alternative form of the command ([--from], [--bundle] or [--oci]) allows you to install directly from a source such as a .flatpak single-file bundle, a .flatpakref app description or an OCI registry. The options are optional if the first argument have the right extension.

Note that flatpak allows one to have multiple branches of an application and runtimes installed and used at the same time. However, only version of an application one can be current, meaning its exported files (for instance desktop files and icons) are visible to the host. The last installed version is made current by default, but you can manually change with make-current.

Unless overridden with the --user or the --installation option, this command installs the application or runtime in the default system-wide installation.

Options

The following options are understood:

-h, --help

Show help options and exit.

--bundle

Assume LOCATION is a .flatpak single-bundle file. This is optional if the arguments ends with .flatpak.

--from

Assume LOCATION is a .flatpakref file containing the details of the app to be installed. This is optional if the arguments ends with .flatpakref.

--oci

Install from a oci registry with a given uri and optionally a tag (defaults to latest).

--user

Install the application or runtime in a per-user installation.

--system

Install the application or runtime in the default system-wide installation.

--installation=NAME

Install the application or runtime in a system-wide installation specified by NAME among those defined in /etc/flatpak/installations.d. Using --installation=default is equivalent to using --system .

--arch=ARCH

The default architecture to install for, if not given explicitly in the REF .

--subpath=PATH

Install only a subpath of the ref. This is mainly used to install a subset of locales. This can be added multiple times to install multiple subpaths.,

--no-deploy

Download the latest version, but don't deploy it.

--no-pull

Don't download the latest version, deploy whatever is locally available.

--no-related

Don't download related extensions, such as the locale data.

--no-deps

Don't verify runtime dependencies when installing.

--app

Assume that all REF s are apps if not explicitly specified.

--runtime

Assume that all REF s are runtimes if not explicitly specified.

-v, --verbose

Print debug information during command processing.

--ostree-verbose

Print OSTree debug information during command processing.

--version

Print version information and exit.

Examples

$ flatpak install gnome org.gnome.gedit2

$ flatpak --installation=default install gnome org.gnome.gedit2

$ flatpak --user install gnome org.gnome.gedit//3.22

$ flatpak --user install https://sdk.gnome.org/gedit.flatpakref

See also

flatpak(1), flatpak-update(1), flatpak-list(1), flatpak-build-bundle(1), flatpak-flatpakref(1)


Name

flatpak-update — Update an application or runtime

Synopsis

flatpak update [OPTION...] [REF...]

Description

Updates applications and runtimes. REF is a reference to the application or runtime to install. If no REF is given, everything is updated.

Each REF arguments is a full or partial indentifier in the flatpak ref format, which looks like "(app|runtime)/ID/ARCH/BRANCH". All elements except ID are optional and can be left out, including the slashes, so most of the time you need only specify ID. Any part left out will be matched against what is installed, and if there are multiple matches an error message will list the alternatives.

By default this looks for both apps and runtime with the given REF in the specified REMOTE , but you can limit this by using the --app or --runtime option, or by supplying the initial element in the REF.

Normally, this command updates the application to the tip of its branch. But it is possible to check out another commit, with the --commit option.

Note that updating a runtime is different from installing a different branch, and runtime updates are expected to keep strict compatibility. If an application update does cause a problem, it is possible to go back to the previous version, with the --commit option.

Unless overridden with the --user or the --installation option, this command updates the default system-wide installation.

Options

The following options are understood:

-h, --help

Show help options and exit.

--user

Update a per-user installation.

--system

Update the default system-wide installation.

--installation=NAME

Updates a system-wide installation specified by NAME among those defined in /etc/flatpak/installations.d. Using --installation=default is equivalent to using --system .

--arch=ARCH

The architecture to update for.

--subpath=PATH

Install only a subpath of the ref. This is mainly used to install a subset of locales. This can be added multiple times to install multiple subpaths. If this is not specified the subpaths specified at install time are reused.

--commit=COMMIT

Update to this commit, instead of the tip of the branch.

--no-deploy

Download the latest version, but don't deploy it.

--no-pull

Don't download the latest version, deploy it whatever is locally available.

--no-related

Don't download related extensions, such as the locale data.

--no-deps

Don't update or install runtime dependencies when installing.

--app

Only look for an app with the given name.

--appstream

Update appstream for the remote.

--runtime

Only look for an runtime with the given name.

-v, --verbose

Print debug information during command processing.

--ostree-verbose

Print OSTree debug information during command processing.

--version

Print version information and exit.

Examples

$ flatpak --user update org.gnome.GEdit

See also

flatpak(1), flatpak-install(1), flatpak-list(1)


Name

flatpak-uninstall — Uninstall an application or runtime

Synopsis

flatpak uninstall [OPTION...] [REF...]

Description

Uninstalls an application or runtime. REF is a reference to the application or runtime to install. If no REF is given, everything is updated.

Each REF arguments is a full or partial indentifier in the flatpak ref format, which looks like "(app|runtime)/ID/ARCH/BRANCH". All elements except ID are optional and can be left out, including the slashes, so most of the time you need only specify ID. Any part left out will be matched against what is installed, and if there are multiple matches an error message will list the alternatives.

By default this looks for both installed apps and runtime with the given NAME , but you can limit this by using the --app or --runtime option.

Normally, this command removes the ref for this application/runtime from the local OSTree repository and purges and objects that are no longer needed to free up disk space. If the same application is later reinstalled, the objects will be pulled from the remote repository again. The --keep-ref option can be used to prevent this.

If all branches of the application/runtime are removed, this command also purges the data directory for the application.

Unless overridden with the --user or the --installation option, this command updates the default system-wide installation.

Options

The following options are understood:

-h, --help

Show help options and exit.

--keep-ref

Keep the ref for the application and the objects belonging to it in the local repository.

--user

Updates a per-user installation.

--system

Updates the default system-wide installation.

--installation=NAME

Updates a system-wide installation specified by NAME among those defined in /etc/flatpak/installations.d. Using --installation=default is equivalent to using --system .

--arch=ARCH

The architecture to uninstall, instead of the architecture of the host system.

--app

Only look for an app with the given name.

--runtime

Only look for an runtime with the given name.

--no-related

Don't uninstall related extensions, such as the locale data.

-v, --verbose

Print debug information during command processing.

--ostree-verbose

Print OSTree debug information during command processing.

--version

Print version information and exit.

Examples

$ flatpak --user uninstall org.gnome.GEdit


Name

flatpak-list — List installed applications and/or runtimes

Synopsis

flatpak list [OPTION...]

Description

Lists the names of the installed applications and/or runtime.

By default, both per-user and system-wide installations are shown. Use the --user, --installation or --system options to change this.

By default this lists the installed apps, but you can change this by using the --app or --runtime option.

Options

The following options are understood:

-h, --help

Show help options and exit.

--user

List per-user installations.

--system

List the default system-wide installations.

--installation=NAME

List a system-wide installation specified by NAME among those defined in /etc/flatpak/installations.d. Using --installation=default is equivalent to using --system .

--arch=ARCH

List installations for this architecture.

-d, --show-details

Show arches and branches, in addition to the application names.

--app

List applications.

--runtime

List runtimes.

-v, --verbose

Print debug information during command processing.

--ostree-verbose

Print OSTree debug information during command processing.

--version

Print version information and exit.

Examples

$ flatpak --user list

org.gnome.Builder
org.freedesktop.glxgears
org.gnome.MyApp
org.gnome.GEdit

See also

flatpak(1), flatpak-install(1), flatpak-update(1)


Name

flatpak-info — Show information about installed application and/or runtime

Synopsis

flatpak info [OPTION...] NAME [BRANCH]

Description

Show info about and installed application and/or runtime.

By default, both per-user and system-wide installations are queried. Use the --user, --system or --installation options to change this.

By default this queries the installed apps and runtimes, but you can limit this by using the --app or --runtime option.

Options

The following options are understood:

-h, --help

Show help options and exit.

--user

Query per-user installations.

--system

Query the default system-wide installation.

--installation=NAME

Query a system-wide installation by NAME among those defined in /etc/flatpak/installations.d. Using --installation=default is equivalent to using --system .

--app

Query for applications.

--runtime

Query for runtimes.

--arch=ARCH

Query for this architecture.

-r, --show-ref

Show the installed ref.

-o, --show-origin

Show the remote the ref is installed from.

-c, --show-commit

Show the installed commit id.

-v, --verbose

Print debug information during command processing.

--version

Print version information and exit.

Examples

$ flatpak info org.gnome.Builder//master

See also

flatpak(1), flatpak-install(1), flatpak-update(1)