All Articles

Support Articles

Table of Contents

Using Flatpak from the Command Line (Pop!_OS)

Why the command line?

It's very easy to find and install Flatpak software from within the Pop!_Shop, but there are advantages to working within the terminal. Using the command line can show additional information and give you more control.

Full documentation about Flatpak commands is available here.

Upating Flatpak packages

The most common reason to use the command line with Flatpak is to run updates. This shows some additional information that's not present in the Pop!_Shop, and if any problems occur, it's easier to tell what's going wrong. The command is very simple:

flatpak update

All terminal commands for Flatpak will look like this, starting with the command flatpak followed by a verb and possibly additional data or parameters.

Listing and running Flatpak software

To view your currently installed Flatpak software:

flatpak list

To run a Flatpak application from the command line:

flatpak run [Application ID]

To look at information about an installed package:

flatpak info [Application ID]

For example, to find out what command to use to run Slack (if already installed from Flatpak), you can run the following:

flatpak list --columns=name,application | grep -i slack

The output will look something like this:

Slack com.slack.Slack

We can look at the package details by running this command:

flatpak info com.slack.Slack

And we can use this command to run Slack from the command line:

flatpak run com.slack.Slack

Finding, installing and uninstalling Flatpak software

To search for a Flatpak package using the currently available sources:

flatpak search [Name]

To install a Flatpak package:

flatpak install [Application ID]

For example, if we're looking for the Flatpak version of the media player mpv, we can find the Application ID by running:

flatpak search mpv

And then install it with:

flatpak install io.mpv.Mpv

You can try to install the app directly by just combining these two seteps, for example:

flatpak install mpv

and the Flatpak system will try to figure out what you're looking for and present you with options.

Uninstalling a Flatpak package works similarly:

flatpak uninstall [Application ID]

There is also the option to delete your user data for a Flatpak application by using the --delete-data parameter. This can be useful when trying to fix a broken application and you want to start completely over. For example, this will uninstall mpv and also delete your configuration files:

flatpak uninstall io.mpv.Mpv --delete-data

Flatpak sources

To list the currently configured Flatpak sources, which the system will search when looking for software:

flatpak remotes

To add a new Flatpak source (with Flathub as the example):

flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

To delete an existing Flathub source:

flatpak remote-delete --user flathub