Raspberry Pi

How to Install Flatpak on Raspberry Pi

Flatpak is a software utility for package management. It allows users to install multiple applications in an isolated environment without getting worried about the distros. Usually, in Raspberry Pi most of the applications are installed through its own package management tool but flatpak provides more updated packages than Raspberry Pi’s package management tool. Also, by installing flatpak, it becomes easy to install all the applications from a single place called Flathub, where all the flatpak applications are available.

If you are looking for a way to install flatpak on Raspberry Pi and read this article.

How to Install Flatpak on Raspberry Pi

To install flatpak on Raspberry Pi, follow the below-written steps:

Step 1: Update/Upgrade the Repository

The flatpak can be installed directly from Raspberry Pi repository, but before that ensure that the repository is updated:

$ sudo apt update

$ sudo apt upgrade

Step 2: Install Flatpak

Then install flatpak by simply running the below-mentioned apt command:

$ sudo apt install flatpak

Step 3: Adding Flatpak Repo

Once the flatpak is installed, it is time to add the flatpak repo to the system using the below-mentioned command:

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

Step 4: Reboot

Once the installation process of flatpak is completed, it’s better to reboot the system using the below-written command, so that system will restart with the newly installed flatpak package:

$ sudo reboot

Add a Flatpak Application

After installing flatpak, you can now easily install flatpak applications from the flathub, just open the browser and go to the Flathub webpage. There you will see a search box where you can search your desired applications or else you can just scroll through the webpage to explore different applications:

Here, I want to add the remmina which is a remote desktop client. Search for Remmina in the search box and click on the application that appears:

Then scroll down and you will find the installation and commands for installing and running this application. The process will remain same for any other application too:

Copy the installation command and paste it into the terminal. Here, I have modified the command little bit with a sudo at the start to assign root permission and a -y flag for the yes to grant installation permission:

$ sudo flatpak install -y flathub org.remmina.Remmina

Remember we have previously seen the run command for Rammina on flathub page, go back to that page and copy this run command:

And paste it in the command-line terminal, as shown below:

$ flatpak run org.remmina.Remmina

You can also open the application from the Application Menu >> Internet >> Rammina:

And here you go your application is running successfully on Raspberry Pi system.

In this way, you can install any application through flatpak on the Raspberry Pi system.

Remove Flatpak from Raspberry Pi

You can use the following command to remove flatpak from Raspberry Pi system:

$ sudo apt remove flatpak -y

Conclusion

Flatpak can be installed on Raspberry Pi from the official Raspberry Pi repository. After installing flatpak, you must add the flatpak repo and then reboot the system. After the reboot, you can install different applications which can be browsed from the flathub webpage. The complete process to add applications using flatpak is discussed in the above-given guidelines.

About the author

Zahra Zamir

An Electronics graduate who loves to learn and share the knowledge, my passion for my field has helped me grasp complex electronics concepts and now I am here to share them with others.