1080*80 ad

Installing and Using Flatpak on Ubuntu 24.04

How to Install and Use Flatpak on Ubuntu 24.04: A Complete Guide

While Ubuntu comes with its own powerful package management systems like APT and Snap, many users seek the flexibility and extensive app library offered by Flatpak. Flatpak is a universal packaging system for Linux that allows you to install applications in a sandboxed environment, isolated from the rest of your system. This enhances security and provides access to the latest versions of software directly from developers.

This guide will walk you through everything you need to know to install, configure, and manage Flatpak applications on Ubuntu 24.04 LTS.

Why Choose Flatpak on Ubuntu?

Before we dive into the installation, it’s helpful to understand the key benefits of using Flatpak:

  • Access to a Massive App Library: The primary Flatpak repository, Flathub, hosts thousands of applications that may not be available in the standard Ubuntu repositories.
  • Up-to-Date Software: Developers can publish app updates directly to Flathub, meaning you often get the latest versions faster than through traditional package managers.
  • Enhanced Security: Flatpak apps run in a sandbox, which limits their access to your personal files and system resources. You have granular control over these permissions.
  • System Stability: Because Flatpak apps and their dependencies are bundled together and isolated, they won’t conflict with system libraries or other software on your machine.

Step 1: Installing the Core Flatpak Framework

Ubuntu 24.04 doesn’t include Flatpak by default, but it’s readily available in the official repositories. The installation process is straightforward.

First, open your terminal (you can use the shortcut Ctrl+Alt+T) and ensure your system’s package list is up to date.

sudo apt update

Next, install the main Flatpak package with the following command:

sudo apt install flatpak

This command installs the necessary backend service to run and manage Flatpak applications. However, this alone isn’t enough to start installing apps.

Step 2: Adding the Flathub Repository

The power of Flatpak comes from its repositories, and Flathub is the de-facto standard app store for Flatpak. It’s where you’ll find almost every application you need. To add the Flathub repository to your system, run this command in the terminal:

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

This command tells your Flatpak installation where to look for applications. The --if-not-exists flag ensures you don’t add it multiple times.

Step 3: Integrating Flatpak with the Ubuntu Software Center

For a seamless, graphical experience, you can integrate Flatpak into the Ubuntu Software application. This allows you to search for, install, and manage Flatpak apps directly from the Software Center, right alongside DEB and Snap packages.

To install the integration plugin, use this command:

sudo apt install gnome-software-plugin-flatpak

After completing this step, it’s crucial to restart your computer. A reboot ensures that the Software Center fully recognizes the new Flathub repository and can display Flatpak applications correctly.

Step 4: Finding and Installing Flatpak Applications

Once your system has restarted, you have two primary methods for installing Flatpak apps.

Method 1: Using the Ubuntu Software Center (GUI)

  1. Open the Ubuntu Software application.
  2. Search for an application, such as “Spotify” or “VLC”.
  3. In the search results, you will now see entries from different sources. Look for an entry with the source listed as “flathub.org”.
  4. Select the Flathub version and click the “Install” button.

Method 2: Using the Command Line (Terminal)

The command line offers a faster and more powerful way to manage your apps.

To search for an application, use the flatpak search command. For example:

flatpak search obs studio

The search results will provide an “Application ID”. You’ll need this ID to install the app. To install an application, use the flatpak install command followed by the repository (flathub) and the Application ID.

For example, to install the popular messaging app Signal:

flatpak install flathub org.signal.Signal

Flatpak will show you the required runtimes and dependencies and ask for your confirmation before proceeding.

Managing Your Flatpak Apps

Managing your installed applications is just as important as installing them. Here are the essential commands you need to know.

  • To run a Flatpak application from the terminal:

    flatpak run org.signal.Signal
    

    (Note: Installed Flatpak apps will also appear in your standard application menu, so you can launch them graphically.)

  • To list all installed Flatpak applications:

    flatpak list
    
  • To update all your Flatpak applications to their latest versions:

    flatpak update
    

    It’s a good security practice to run this command regularly.

  • To remove a Flatpak application:

    flatpak uninstall org.signal.Signal
    
  • To remove unused runtimes and free up disk space:
    After uninstalling apps, you may have leftover dependencies. This command cleans them up:
    bash
    flatpak uninstall --unused

Important Security Tip: Managing App Permissions

One of Flatpak’s strongest features is its sandboxing, but it’s only effective if you manage permissions correctly. By default, apps have limited access. If you want more control over what an app can access (like your home folder, network, or hardware), we highly recommend installing Flatseal.

Flatseal is a graphical utility that gives you a simple interface to review and modify the permissions for each of your installed Flatpak apps.

Install Flatseal with this command:

flatpak install flathub com.github.tchx84.Flatseal

By regularly reviewing permissions with Flatseal, you can ensure that your applications only have access to the resources they absolutely need, significantly hardening your system’s security.

Source: https://kifarunix.com/how-to-install-and-use-flatpak-on-ubuntu-24-04/

900*80 ad

      1080*80 ad