Mint

How to Install and Use Flatpak on Linux Mint 21?

How to Install and Use Flatpak on Linux Mint

Flatpak is the package manager that enables users to install various applications on their Linux system from Flathub. Flathub is the default repository (application store) that offers a wide range of Flatpak applications for Linux distribution. Linux Mint has its own APT package manager but many applications are not available on it. In such a case, the user can look for the desired application in Flathub and use Flatpak to install it.

Flatpak is pre-installed on all the new versions of Linux Mint systems. However, if you are working on the old version of the Linux Mint system or the Flatpak is not pre-installed on the Linux Mint (new version), you will have to install it manually.

Quick Outline

How to Install Flatpak on Linux Mint

The Flatpak can be installed on the Linux Mint system using:

Method 1: Default Linux Mint Repository

You can easily install Flatpak from the default Linux Mint repository through the “apt” command. However, you will not get Flatpak’s latest version using this method.

To install Flatpak on Linux Mint systems, follow the provided steps:

Step 1: Install Flatpak From the Linux Mint Repository

Execute the below-provided command to install Flatpak on your system from the standard Linux Mint repository:

sudo apt install flatpak

Step 2: Verification

To verify whether the Flatpak is installed or not, check its version:

flatpak --version

The below output indicates that the older version (as the latest version is 1.14.4) of the Flatpak has been installed on the system:

Method 2: Using Flatpak PPA Repository

If you want to install the latest version of Flatpak on your system, you will have to add the official Flatpak PPA (Personal Package Archive) repository on your systems. The Flatpak PPA provides Flatpak packages for particular Linux distributions and allows you to install desired packages and applications.

To install Flatpak on Linux Mint using the PPA repository, use the following steps:

Step 1: Update the System Repository

First, update the Linux Mint packages before upgrading Flatpak through the given command:

sudo apt update;sudo apt upgrade

Subsequently, all the system’s repository packages will be updated and upgraded:

Step 2: Add Flatpak PPA on Linux Mint

Then, import the official Flatpak PPA repository on your Linux Mint system using the provided command:

sudo add-apt-repository ppa:flatpak/stable -y

Step 3: Update the System

Next, use the following command to update the system’s packages list:

sudo apt update

By doing so, the system’s repository packages will be updated:

Step 4: Install Flatpak on Linux Mint

Now, install Flatpak on your Linux Mint system via the given command:

sudo apt install flatpak

Step 5: Verification

Finally, check the version of Flatpak to ensure that its latest version is installed:

flatpak --version

As you can see, the latest version of Flatpak has been installed on the system successfully:

 

Important: Add/Import Flathub Repository on Linux Mint

You need to add the Flathub repository on your Linux Mint system to download packages and applications from Flathub. For this purpose, write out the below-listed command:

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

How to Use Flatpak on Linux Mint

You can use Flatpak packet manager to install and use various Flatpak applications from Flathub. Check out the following use cases to see how Flatpak is used to manage applications on Linux Mint systems:

Note: We will be using the “Spotify” application as an example to address all the above-mentioned cases.

Search Flatpak Applications

To search for a specific Flatpak application on Linux Mint, use the “flatpak search <application-name>” command and specify the desired application name as seen below:

flatpak search spotify

The below output shows the application name, description, application ID, version, and all other details:

Install Flatpak Applications

To install the desired application from Flathub on the Linux Mint system, utilize the “flatpak install flathub <application-ID>” command. Here, we have specified the “com.spotify.Client” ID of the Spotify application to install it:

flatpak install flathub com.spotify.Client -y

Subsequently, the Spotify application will be installed on your system:

Display Installed Flatpak Application Details

If you want to display the information of the installed Flatpak application, you can use the “flatpak info <application-ID>” command:

flatpak info com.spotify.Client

In the below output, the detailed information of the installed Spotify application can be seen:

Run Flatpak Applications

You can use the “flatpak run <application-ID>” command to run and launch the Flatpak application installed from Flathub:

flatpak run com.spotify.Client

It can be seen that the Spotify application has been launched successfully:

Update Flatpak Applications

To update the specific Flatpak application on your Linux Mint system, run the “flatpak update <application-ID>” command and specify the desired application ID:

flatpak update com.spotify.Client

Moreover, utilize the given command to update all the installed Flatpak packages/applications on your system:

flatpak update

List All the Installed Flatpak Applications/Packages

If you want to display all the installed Flatpak packages/applications with relevant information on your Linux Mint system, type out the provided command:

flatpak list

The below output shows the names, IDs, versions, and branches of all the installed Flatpack packages/applications:

Uninstall Flatpak Applications

To uninstall or remove a particular Flatpak application from the Linux Mint system, use the “flatpak uninstall <application-ID>” command:

flatpak uninstall com.spotify.Client -y

According to the below output, the Spotify application has been uninstalled successfully:

Furthermore, if you want to uninstall all the installed Flatpak applications, run the given command:

flatpak uninstall --all

Press “Y” to continue and remove all the Flatpak applications from the Linux Mint system:

Note: You can also access Flathub on the web to install Flathub applications on your Linux Mint systems.

How to Repair Flatpak Installation on Linux Mint

While using Flatpak on Linux Mint, you may face installation issues, such as broken file packages and dependencies. To resolve such kind of Flatpak issue, the provided command can be used:

flatpak repair

How to Remove/Uninstall Flatpak from Linux Mint

If you do not want to use Flatpak on your Linux Mint system, you can use the provided command to simply remove or uninstall it:

sudo apt autoremove flatpak --purge -y

If you have installed Flatpak using PPA, you should remove that PPA too. Use the following command to do so:

sudo add-apt-repository --remove ppa:flatpak/stable

To ensure that Flatpak has been uninstalled from your system, run the given command:

flatpak --version

As you can see, Flatpak has been successfully removed from the Linux Mint system:

That was all about installing, using, and removing Flatpak on Linux Mint.

Final Thoughts

Flaptak is a package manager that enables you to install and run necessary applications in an isolated environment on your Linux Mint systems. You can easily install Flatpak on your system from the default Linux Mint repository using the “sudo apt install flatpak” command. However, if you want to get Flatpak’s latest version, add the official Flatpak PPA repository to your systems. You can use Flatpak to install, run, search, list, remove, and manage Flatpak applications on your Linux Mint system.

This guide has illustrated the method to install, upgrade, use, repair, and remove Flatpak on Linux Mint.

Similar Posts