How to use Flatpak? Step-By-Step Guide
Last Updated :
13 Jun, 2024
Flatpak is a framework for creating desktop packages in many Linux distributions. It has been developed by users with extensive history of working with the Linux computer device and runs as an unbiased open-source project. Flatpak’s strength lies in its up-to-date approach to software software delivery. It removes traditional constraints and provides a simple answer for computer programs, regardless of the programming language they use, the hardware they use, or the frameworks they use. This flexibility guarantees that builders can use Flatpak without questioning compatibility problems.
Steps To Install of Flatpak
To install the Flatpak into your system follow these steps:
Step 1: Update system packages with the following command.
sudo apt update && upgrade
Step 2: Install Flatpak with the following command
sudo apt install flatpak
-(1).jpeg)
Step 3: Install Flatpak support for GNOME Software with the following command.
sudo apt install gnome-software-plugin-flatpak
And that’s it you have successfully installed the flatpak for your system and ready to install and manage softwares and packages on it.
Steps To Install and use Applications in Flatpak
All the apps retrieved or provided by flatpak are actually hosted on Flathub which is remote repository for applications distributed by flapak.
So to install the apps you need to add this remote repository of flathub using this command:
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Now you can download and install any application using flatpak . Suppose you wanted to install VSCode (Visual Studio code) for your linux system, You can do it by following command:
flatpak install flathub com.visualstudio.code

Note: "to get this command , visit Flathub webpage and search software you want to install you’ll get command on installation description button"

Run the installed application using this command:
flatpak run com.visualstudio.code
Uninstalling or Removing Software Packages from Flapak
To uninstall or remove any software from your system by using flatpak use following command:
sudo flatpak uninstall (Name of package/ app want to remove)
Suppose you want to remove the VsCode application from your system you can do this :
sudo flatpak uninstall com.visualstudio.code

Note: You have to use same package name that you used while installation process of that package.
Updating / Upgrading Flatpak Applications
To keep your application updated in flatpak it provides update functionality by following command:
sudo flatpak update org.ppsspp.PPSSPP

Flatpak Permissions and Sandboxing
One of the main goals of Flatpack is to increase the security of desktop systems by isolating applications from each other. This is achieved using sandboxing and means that, by default, applications running Flatpack have very limited access to the host environment. this includes:
- No access to any host files except runtime, app, ~/.var/app/$FLATPAK_ID, and $XDG_RUNTIME_DIR/app/$FLATPAK_ID. Only the latter two are writable
- There is no access to the network
- No access to any device nodes (other than /dev/null, etc.).
- There is no access to processes outside the sandbox.
Creating Custom Flatpak Builds
We know that flapak provides both services for retrieving and hosting application and softwares so we can also create our customs builds and applications using it and deploy it on flathub for providing those builds to user publicly.
We have created an sample application build on Flatpak which displays Text when it is run using flatpak.

Note: To create your own custom application builds you can visit the official webpage of flatpak Where all the detailed information about building and deploying application is provided thoroughly
Conclusion
As we’ve learned in this article, Flatpack has dramatically changed the landscape of desktop application distribution on Linux, providing a unified and efficient framework for both developers and users. We have covered important aspects of Flatpack, from installation and basic usage to storage and application management. Additionally, we’ve tried to update your apps, handle licensing and sandboxing for increased security, and custom Flatpack builds.
Similar Reads
How to Use Django's Flatpages App "How to Use Django's Flatpages App" is an article that guides you through the utilization of Django's Flatpages app for managing and displaying static content on your website. This article provides insights, code examples, and step-by-step instructions on implementing Flatpages in your Django projec
6 min read
How to Install and Use Flatpak on Linux Flatpak, a package management system, is designed to build and distribute applications on Linux distributions. It operates independently from the host system in a sandboxed environment, making it distro-agnostic and ensuring a consistent user experience across various Linux distributions.What is Fla
4 min read
How To Install bacula-client on Ubuntu? Whatever the Operating System you are using, you should have to take care of your Files on Local Machine. So, you have to rely on the Data Backup & Recovery Feature. The Bacula-Client Application is one best to note. To Install Bacula-Client on Ubuntu Operating System, you will get a series of m
4 min read
C++ 23 - <flat_set> Header <flat_set> is a header file that provides the implementation of the std::flat_set container class in C++, which is a sorted associative container that stores unique elements and allows for fast access, insertion, and removal of elements. The flat_set is a container similar to the set but its e
10 min read
What is the use of FlatList ? In this article, we are going to learn about the uses of the FlatList Component. So firstly let's know what is FlatListt?The FlatList component is an efficient way to display items in a scrollable list view. This component has many supported features such as Scroll Loading, header/footer views suppo
5 min read
How to Back Up and Restore Data in Linux? Backing up and restoring data in Linux is essential for ensuring the security and integrity of your files and system. Whether you're safeguarding personal data or managing critical system files, having a reliable backup strategy is crucial. Linux offers various methods and tools for creating backups
4 min read