Quick Setup For Flatpak on AlmaLinux 9 and RHEL 9

This tutorial intends to teach you to a Quick Setup For Flatpak package Manager on AlmaLinux 9 and RHEL 9. As described on the Flatpak official site, it is a system for building, distributing, and running sandboxed desktop applications on Linux. As a package manager, Flatpak offers amazing features. One of the most amazing features is that you don’t need to worry about dependencies/libraries that the program requires to run when working with Flatpak

A Quick Setup For Flatpak on AlmaLinux 9 and RHEL 9

To install FlatPak on your server, you must have SSH access to your server as a non-root user with sudo privileges. For this purpose, you can visit this guide on Initial Server Setup with AlmaLinux 9.

Next, follow the steps below to complete this guide.

Step 1 – Install Flatpak on AlmaLinux 9 and RHEL 9

First, you must run the system update by using the following command:

sudo dnf update -y

The Flatpak package is available on the default Linux repository. To install it, simply run the following command:

sudo dnf install flatpak -y

Verify your Flatpak installation by checking its version:

flatpak --version
Output
Flatpak 1.12.7

Step 2 – Usage of Flatpak Package Manager

At this point, we want to show you how to use your Flatpak package manager on AlmaLinux 9 and RHEL 9. To do this, follow the steps below.

Enable Flathub

Before using Flatpak, you must enable FlatHub on your server. FlatHub is an efficient and popular platform used for searching applications.

To do this, you can use the following command:

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

Search Apps with Flatpak

To search for a specific app, you can use the following syntax:

flatpak search <Application_name>

For example, search for OpenJDK:

flatpak search openjdk
Output
Name      Description              Application ID        Version  Branch Remotes
OpenJDK … The latest version of t… …dk.Extension.openjdk 20.0.2+9 22.08  flathub
OpenJDK … The latest version of t… …dk.Extension.openjdk          21.08  flathub
OpenJDK … The latest version of t… …dk.Extension.openjdk          20.08  flathub
OpenJDK … The latest version of t… …dk.Extension.openjdk          19.08  flathub
OpenJDK … The latest version of t… …dk.Extension.openjdk          18.08  flathub
OpenJdk … OpenJdk 8 Sdk extension  …k.Extension.openjdk8          22.08  flathub
OpenJdk … OpenJdk 8 Sdk extension  …k.Extension.openjdk8          21.08  flathub
OpenJdk … OpenJdk 8 Sdk extension  …k.Extension.openjdk8          20.08  flathub
OpenJDK … The LTS (long term supp… ….Extension.openjdk17          22.08  flathub
OpenJDK … The LTS (long term supp… ….Extension.openjdk17          21.08  flathub
OpenJDK … The LTS (long term supp… ….Extension.openjdk17          20.08  flathub
OpenJDK … The LTS (long term supp… ….Extension.openjdk11          22.08  flathub
OpenJDK … The LTS (long term supp… ….Extension.openjdk11          21.08  flathub
OpenJDK … The LTS (long term supp… ….Extension.openjdk11          20.08  flathub
OpenJDK … The LTS (long term supp… ….Extension.openjdk11          19.08  flathub
OpenJDK … The LTS (long term supp… ….Extension.openjdk11          18.08  flathub

Install an App or Package with Flatpak

When your desired application is found, you can easily use Flatpak to install it on your AlmaLinux or RHEL 9 with the following command:

flatpak install <Application_name>

For example:

flatpak install openjdk

This will ask you which version you want to install.

Looking for matches…
Similar refs found for ‘openjdk’ in remote ‘flathub’ (system):

   1) runtime/org.freedesktop.Sdk.Extension.openjdk8/x86_64/21.08
   2) runtime/org.freedesktop.Sdk.Extension.openjdk10/x86_64/18.08
   3) runtime/org.freedesktop.Sdk.Extension.openjdk/x86_64/18.08
   4) runtime/org.freedesktop.Sdk.Extension.openjdk17/x86_64/20.08
   5) runtime/org.freedesktop.Sdk.Extension.openjdk8/x86_64/22.08
   6) runtime/org.freedesktop.Sdk.Extension.openjdk11/x86_64/18.08
   7) runtime/org.freedesktop.Sdk.Extension.openjdk/x86_64/19.08
   8) runtime/org.freedesktop.Sdk.Extension.openjdk17/x86_64/21.08
   9) runtime/org.freedesktop.Sdk.Extension.openjdk11/x86_64/19.08
  10) runtime/org.freedesktop.Sdk.Extension.openjdk/x86_64/20.08
  11) runtime/org.freedesktop.Sdk.Extension.openjdk17/x86_64/22.08
  12) runtime/org.freedesktop.Sdk.Extension.openjdk11/x86_64/20.08
  13) runtime/org.freedesktop.Sdk.Extension.openjdk/x86_64/21.08
  14) runtime/org.freedesktop.Sdk.Extension.openjdk8/x86_64/18.08
  15) runtime/org.freedesktop.Sdk.Extension.openjdk11/x86_64/21.08
  16) runtime/org.freedesktop.Sdk.Extension.openjdk/x86_64/22.08
  17) runtime/org.freedesktop.Sdk.Extension.openjdk9/x86_64/18.08
  18) runtime/org.freedesktop.Sdk.Extension.openjdk8/x86_64/19.08
  19) runtime/org.freedesktop.Sdk.Extension.openjdk11/x86_64/22.08
  20) runtime/org.freedesktop.Sdk.Extension.openjdk10/x86_64/1.6
  21) runtime/org.freedesktop.Sdk.Extension.openjdk8/x86_64/1.6
  22) runtime/org.freedesktop.Sdk.Extension.openjdk9/x86_64/1.6
  23) runtime/org.freedesktop.Sdk.Extension.openjdk8/x86_64/20.08

Which do you want to use (0 to abort)? [0-23]: 1

When your installation is completed, you will get the following output:

Output
        ID                                            Branch        Op       Remote        Download
        ID                                            Branch        Op       Remote        Download
 1. [✓] org.freedesktop.Sdk.Extension.openjdk8        21.08         i        flathub       112.8 MB / 115.2 MB

Installing… ████████████████████ 100%  22.6 MB/s  00:00

Uninstall a Package with Flatpak

To uninstall an App with Flatpak, you can use the following syntax:

flatpak uninstall APP-ID

For example:

flatpak uninstall runtime/org.freedesktop.Sdk.Extension.openjdk8
Output

        ID                                               Branch          Op
        ID                                               Branch          Op
 1. [-] org.freedesktop.Sdk.Extension.openjdk8           21.08           r

Uninstalling…

For more information, you can visit the Flatpak Docs page.

Uninstall or Remove Flatpak from RHEL 9

If you no longer want to use Flatpak, you can easily remove it with the command below:

sudo dnf autoremove flatpak -y

Conclusion

At this point, you have learned A Quick Setup For Flatpak on AlmaLinux 9 and RHEL 9. Also, you have learned the basic usage of Flatpak to search, install, and remove an app.

Hope you enjoy it. For more guides and articles about Linux, you can visit Linux Tutorials.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Stay informed and not overwhelmed, subscribe now!