Skip to content
Support

Using Flatpak from the Command Line (Pop!_OS)

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.

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:

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

To view your currently installed Flatpak software:

Terminal window
flatpak list

To run a Flatpak application from the command line:

Terminal window
flatpak run [Application ID]

To look at information about an installed package:

Terminal window
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:

Terminal window
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:

Terminal window
flatpak info com.slack.Slack

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

Terminal window
flatpak run com.slack.Slack

Finding, installing and uninstalling Flatpak software

Section titled “Finding, installing and uninstalling Flatpak software”

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

Terminal window
flatpak search [Name]

To install a Flatpak package:

Terminal window
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:

Terminal window
flatpak search mpv

And then install it with:

Terminal window
flatpak install io.mpv.Mpv

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

Terminal window
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:

Terminal window
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:

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

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

Terminal window
flatpak remotes

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

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

To delete an existing Flathub source:

Terminal window
flatpak remote-delete --user flathub