Flatpak
Revision for “Flatpak” created on May 1, 2023 @ 18:48:26
Title | Flatpak |
---|---|
Content | <h2>Flatpak</h2>
<strong>Flatpak</strong> is a software deployment/package management utility created by RedHat and can be seen as an alternative/distant cousin to Apt & <a href="https://www.bodhilinux.com/w/synaptic-package-manager/">Synaptic Package Manager</a> and very similar Canonicals <a href="https://www.bodhilinux.com/w/snap/">Snap</a>. As is the case with Snap, flatpak apps (software packages) are isolated from the rest of your system. They have their own file system and can’t interfere with other apps on your PC/Laptop.
<strong>Caveat for use – Minimal Resource PCs/Laptops</strong>
This guide installs gnome shell. If you are using a minimal Bodhi specification PC/Laptop, the memory demands may overwhelm your available system resources and as such your mileage on use may not be optimal.
<h3><span id="Installing_Snapd">Install Flatpak</span></h3>
Flatpak can be installed via <a href="https://www.bodhilinux.com/w/synaptic-package-manager/">Synaptic Package Manager</a>, or via apt through <a href="https://www.bodhilinux.com/w/terminology/">Terminology</a>. the latter is shown below.
<pre class="wp-block-preformatted">sudo apt update && sudo apt install flatpak</pre>
<h3>Install FlatHub</h3>
Flathub is an app store for Flatpak apps, from where apps can be discovered and installed. Using <a href="https://www.bodhilinux.com/w/terminology/">Terminology</a>, run the following command
<pre>sudo apt install gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo</pre>
When the installation is complete, reboot Bodhi Linux to ensure all the
<pre>sudo reboot</pre>
<h3>Flathub</h3>
To open the Flathub, navigate to:
<p style="padding-left: 30px;"><em>Main Menu > Applications > Other > Software</em></p>
When Flathub opens you will see a list fo software categories, Editor Pick's, Recent Releases, etc. Once you have found the software you'd like to install, <em>double-click</em> to open page detailing the software. from within this page click the "<em>install</em>" button.
<h3>FlatPak Apps Management – command-line</h3>
All the following commands are run at the command-line using <a href="https://www.bodhilinux.com/w/terminology/"><em>Terminology</em></a>
<h4>Search for Apps</h4>
<pre>flatpak search <app name></pre>
As an example, to search for the Spotify app the command is:
<pre>flatpak search spotify</pre>
<a href="https://www.bodhilinux.com/trial/wp-content/uploads/2020/11/flatpak_search.png?x55737"><img class="aligncenter size-medium wp-image-3671" src="https://www.bodhilinux.com/trial/wp-content/uploads/2020/11/flatpak_search-620x126.png?x55737" alt="flatpak search" width="620" height="126" /></a>
<p style="padding-left: 30px;">NOTE: Take note of the <em>Application ID</em> and <em>Remotes. </em>These will be needed to install the app</p>
<h4>Install an App</h4>
<pre>flatpak install <Remotes> <ApplicationID></pre>
Using the example from <em>Search</em> (above), to install Spotify, the install command will be:
<pre>flatpak install flathub com.spotify.Client</pre>
<h4>List Installed Apps</h4>
<pre>flatpak list --app</pre>
<h4>Launch App</h4>
<pre>flatpak run <ApplicationID></pre>
NOTE: Apps will be added to the Main Menu and can be launched there too.
<h4>Update All Apps</h4>
<pre>sudo flatpak update</pre>
<h4>Remove an App</h4>
<pre>flatpak uninstall <ApplicationID>
flatpak uninstall --unused</pre>
<p style="padding-left: 30px;">NOTE: The second command removes any unused runtimes used by the app that is being removed.</p>
<h3><span id="Completely_Remove_SnapsSnapd">Completely Remove Flatpak & Apps</span></h3>
Using <a href="#FlatPak_Apps_Management_command-line">Flatpak Management – Command-line</a> as a guide, perform the following steps using <a href="https://www.bodhilinux.com/w/terminology/"><em>Terminology</em></a>:
<ol>
<li><strong>List Install Packages</strong>
<code>flatpak list</code></li>
<li><strong>Remove all Packages</strong>. For each item listed in the output of step #1, run
<code>flatpak uninstall ApplicationID
flatpak uninstall --unused</code></li>
<li><strong>Remove Flatpak</strong>
<code>sudo apt purge flatpak</code></li>
<li><strong>Remove files
<code>sudo rm -rf /var/lib/flatpak
rm -rf ~/.local/share/flatpak
rm -rf ~/.cache/flatpak</code>
</strong></li>
</ol>
<a href="https://www.bodhilinux.com/">Bodhi Linux Home</a>
<a href="https://www.bodhilinux.com/w/wiki/">Bodhi Linux – Wiki Home Page</a>
<a href="https://www.bodhilinux.com/w/bodhi-linux-how-to/">Bodhi Linux – Wiki Table of Contents</a> |
Excerpt |