{"id":3157,"date":"2025-11-24T20:08:57","date_gmt":"2025-11-25T03:08:57","guid":{"rendered":"https:\/\/catbradley.io\/?p=3157"},"modified":"2025-11-24T20:08:57","modified_gmt":"2025-11-25T03:08:57","slug":"backup-and-restore-your-flatpak-apps-settings-between-distro-switch-and-reinstalls","status":"publish","type":"post","link":"https:\/\/catbradley.io\/?p=3157","title":{"rendered":"Backup and Restore Your Flatpak Apps &amp; Settings Between Distro Switch and Reinstalls"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/itsfoss.com\/content\/images\/2025\/11\/backup-restore-flatpak.webp\" alt=\"Backup and Restore Your Flatpak Apps &amp; Settings Between Distro Switch and Reinstalls\" \/><\/p>\n<p><a href=\"https:\/\/itsfoss.com\/what-is-flatpak\/\" rel=\"noreferrer\">Flatpak<\/a> has pretty much become the de-facto standard for universal packages on the Linux desktop, with an increasing number of distros supporting the format in their default installs. Yet, even with how easy it is to install and update Linux apps with Flatpak, moving them to a new system can be tricky, especially if you\u2019ve installed dozens over time.<\/p>\n<p>Sure, you <em>could<\/em> list and reinstall everything manually, but that\u2019s tedious work, and easily prone to human error. Fortunately, there\u2019s a simple way to export your Flatpak apps, remotes, and even overrides so you can recreate your setup on another machine with just a few commands.<\/p>\n<p>You can even backup and restore your settings on another system.<\/p>\n<h2>1. Exporting your Flatpak apps<\/h2>\n<p>On the system where you&#8217;ve got all your apps, you&#8217;ll first want to save a list of your installed apps as <a href=\"https:\/\/itsfoss.com\/no-remote-ref-found-flatpak\/\" rel=\"noreferrer\">Flatpak &#8220;refs&#8221;<\/a>, including where each one is installed. <a href=\"https:\/\/flatpak.org\/?ref=itsfoss.com\">Flatpaks<\/a> can be installed either system-wide (and thus available to all users) or per-user. The process is different depending on whether you&#8217;re running a single-user set up, or if you have to back up and restore for multiple users.<\/p>\n<h3>For single-user systems<\/h3>\n<p><em><strong>This assumes you have no other users on your system<\/strong>. <\/em>Backup both user and system apps you have access to.<\/p>\n<pre><code class=\"language-bash\">flatpak list --app --columns=installation,ref &gt; flatpak-apps.txt\n<\/code><\/pre>\n<h3>For a multi-user setup<\/h3>\n<p>First, you&#8217;ll need to copy any system-level installations:<\/p>\n<pre><code class=\"language-bash\"># Backup only system-installed apps\nflatpak list --system --app --columns=ref &gt; flatpak-apps-system.txt\n<\/code><\/pre>\n<div class=\"kg-card kg-callout-card kg-callout-card-red\">\n<div class=\"kg-callout-emoji\">\u2757<\/div>\n<div class=\"kg-callout-text\">This will <i><em class=\"italic\">not<\/em><\/i> copy any user-installed Flatpaks.<\/div>\n<\/div>\n<p>Next, copy any user-installed Flatpaks. You&#8217;ll need to do this for every user individually. Have each user run this to backup their personal installations.<\/p>\n<pre><code class=\"language-bash\">flatpak list --user --app --columns=ref &gt; flatpak-apps-user-$USER.txt\n<\/code><\/pre>\n<p>Then, back up your Flatpak remotes (the repositories your apps came from):<\/p>\n<pre><code class=\"language-bash\">flatpak remotes --columns=name,url &gt; flatpak-remotes.txt\n<\/code><\/pre>\n<p>Each Flatpak app has a unique \u201cref\u201d (short for &#8220;reference&#8221;) that identifies its source, branch, and architecture. Saving these ensures you reinstall the <em>exact<\/em> same apps later.<\/p>\n<h3>Exporting your overrides (optional)<\/h3>\n<p>Overrides are the individual settings that you can modify for each Flatpak with an app like Flatseal. By exporting all overrides together at once, you can preserve your settings across installs.<\/p>\n<p>To do this, you can run the following command:<\/p>\n<pre><code class=\"language-bash\"># Export Flatpak overrides to a file\nflatpak override --show &gt; flatpak-overrides.txt<\/code><\/pre>\n<p>You can later restore these overrides on your target system.<\/p>\n<h3>Exporting your app data<\/h3>\n<p>Flatpak app data, like configuration files and saved sessions, is stored in <code>~\/.var\/app\/<\/code>. You can copy this folder to your target system any time you want to transfer your app settings. For individual apps, you can copy their individual folders.<\/p>\n<p>For example, for GIMP, you can copy <code>~\/.var\/app\/org.gimp.GIMP<\/code>.<\/p>\n<h2>2. Preparing the target system (optional)<\/h2>\n<div class=\"kg-card kg-callout-card kg-callout-card-blue\">\n<div class=\"kg-callout-emoji\">\u2139\ufe0f<\/div>\n<div class=\"kg-callout-text\">I assume that you&#8217;re transferring your apps to another system. If that&#8217;s not the case, you can skip this step.<\/div>\n<\/div>\n<p>It goes without saying, but if you&#8217;re going to transfer your Flatpak apps to another system, you should ensure that the target system has Flatpak support. To check this, you can run:<\/p>\n<pre><code class=\"language-bash\"># Check if Flatpak is installed\nflatpak --version\n<\/code><\/pre>\n<figure class=\"kg-card kg-image-card kg-card-hascaption\"><img decoding=\"async\" src=\"https:\/\/itsfoss.com\/content\/images\/2025\/11\/Screenshot-From-2025-11-09-22-47-28--Edit-.png\" class=\"kg-image\" alt=\"Backup and Restore Your Flatpak Apps &amp; Settings Between Distro Switch and Reinstalls\" loading=\"lazy\" width=\"698\" height=\"323\" \/><figcaption><span>Checking that Flatpak is installed and working<\/span><\/figcaption><\/figure>\n<p>If you got a version number, you\u2019re good to go. Most popular distros, including Fedora, Mint, and Pop!_OS, have Flatpak preinstalled.<\/p>\n<p>If you&#8217;re planning on migrating to a fresh installation of Ubuntu, you&#8217;ll need to install Flatpak first:<\/p>\n<pre><code class=\"language-bash\"># Install Flatpak\nsudp apt -y install flatpak<\/code><\/pre>\n<h2>3. Recreating your setup on the new system<\/h2>\n<p>On your new Linux install, the first step is to re-add your Flatpak remotes:<\/p>\n<pre><code class=\"language-bash\"># Add saved Flatpak remotes\nwhile read -r name url; do\n  flatpak remote-add --if-not-exists \"$name\" \"$url\"\ndone &lt; flatpak-remotes.txt<\/code><\/pre>\n<p>Remember to run this command in the same directory where you have your flatpak-remotes.txt saved.<\/p>\n<h3>Reinstalling your apps<\/h3>\n<p>Once you&#8217;ve added your Flatpak remotes, you can now reinstall all your apps to their original locations:<\/p>\n<pre><code class=\"language-bash\"># Restore Flatpaks:\nwhile read -r inst ref; do\n  if [ \"$inst\" = \"user\" ]; then\n    flatpak install -y --user \"$ref\"\n  else\n    flatpak install -y --system \"$ref\"\n  fi\ndone &lt; flatpak-apps.txt<\/code><\/pre>\n<p>Once this process completes, you can confirm that everything worked by running:<\/p>\n<pre><code class=\"language-bash\">flatpak list --app<\/code><\/pre>\n<p>You can compare this output with your original <code>flatpak-apps.txt<\/code>\u00a0file to verify all your apps are back.<\/p>\n<h3>Restoring overrides (optional)<\/h3>\n<p>If you&#8217;ve saved your Flatpak overrides, you can restore them by running:<\/p>\n<pre><code class=\"language-bash\"># Restore your Flatpak Overrides\nwhile read -r line; do\n  # Skip empty lines and comments\n  [[ -z \"$line\" || \"$line\" =~ ^# ]] &amp;&amp; continue\n\n  flatpak override $line\ndone &lt; flatpak-overrides.txt\n<\/code><\/pre>\n<h2>Optional bonus for advanced users: Automating your setup<\/h2>\n<p>If you frequently install or test new Flatpak apps, you can automate this process so your backups stay up to date, and you can quickly move your apps to a new system at any time.<\/p>\n<p>Create a simple script (e.g., <code>~\/bin\/flatpak-backup.sh<\/code>):<\/p>\n<pre><code class=\"language-bash\">#!\/bin\/bash\nflatpak list --app --columns=installation,ref &gt; ~\/flatpak-apps.txt\nflatpak remotes --columns=name,url &gt; ~\/flatpak-remotes.txt\nflatpak override --show &gt; ~\/flatpak-overrides.txt\necho \"Flatpak backup completed on $(date)\" &gt;&gt; ~\/flatpak-backup.log\n<\/code><\/pre>\n<p>Then, make the shell script executable:<\/p>\n<pre><code class=\"language-bash\">chmod +x ~\/bin\/flatpak-backup.sh\n<\/code><\/pre>\n<p>Then schedule it to run weekly with <code>cron<\/code>:<\/p>\n<pre><code class=\"language-bash\">crontab -e\n<\/code><\/pre>\n<p>Add this line (runs every Sunday at 10 AM):<\/p>\n<pre><code>0 10 * * SUN ~\/bin\/flatpak-backup.sh\n<\/code><\/pre>\n<p>This way, your Flatpak list and overrides stay current without any manual work.<\/p>\n<h2><strong>Wrapping up<\/strong><\/h2>\n<p>You now know how to quickly back up and migrate your Flatpak apps between systems in a clean, scriptable. It\u2019s lightweight, doesn\u2019t require extra tools, and makes distro hopping or system rebuilds much easier.<\/p>\n<p>If you&#8217;d like to take this to the next level, here&#8217;s another quick tip: you can keep your Flatpak backup files in a version control system like git or a personal storage solution like Nextcloud. This way, if disaster strikes, you\u2019ll be able to rebuild your app environment in minutes.<\/p>\n<p>You can also <a href=\"https:\/\/itsfoss.com\/snap-app-back-up-restore\/\">backup and restore Snap packages<\/a> in similar function.<\/p>\n<figure class=\"kg-card kg-bookmark-card\"><a class=\"kg-bookmark-container\" href=\"https:\/\/itsfoss.com\/snap-app-back-up-restore\/\">\n<div class=\"kg-bookmark-content\">\n<div class=\"kg-bookmark-title\">Move Between the Distros: Back Up and Restore Your Snap Packages<\/div>\n<div class=\"kg-bookmark-description\">Make a backup of your Snap apps and application data and restore them to a new Linux system where Snap is supported. Works between Ubuntu and non-Ubuntu distros, too.<\/div>\n<div class=\"kg-bookmark-metadata\"><img decoding=\"async\" class=\"kg-bookmark-icon\" src=\"https:\/\/itsfoss.com\/content\/images\/icon\/android-chrome-512x512-44.png\" alt=\"Backup and Restore Your Flatpak Apps &amp; Settings Between Distro Switch and Reinstalls\" \/><span class=\"kg-bookmark-author\">It&#8217;s FOSS<\/span><span class=\"kg-bookmark-publisher\">Roland Taylor<\/span><\/div>\n<\/div>\n<div class=\"kg-bookmark-thumbnail\"><img decoding=\"async\" src=\"https:\/\/itsfoss.com\/content\/images\/thumbnail\/backup-snap-packages-1.png\" alt=\"Backup and Restore Your Flatpak Apps &amp; Settings Between Distro Switch and Reinstalls\" \/><\/div>\n<p><\/p><\/a><\/figure>\n<p>I hope you find it useful \ud83d\ude04<\/p>","protected":false},"excerpt":{"rendered":"<p>Flatpak has pretty much become the de-facto standard for universal packages on the Linux desktop, with an increasing number of distros supporting the format in their default installs. Yet, even&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3157","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rss"],"_links":{"self":[{"href":"https:\/\/catbradley.io\/index.php?rest_route=\/wp\/v2\/posts\/3157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/catbradley.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/catbradley.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/catbradley.io\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/catbradley.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3157"}],"version-history":[{"count":0,"href":"https:\/\/catbradley.io\/index.php?rest_route=\/wp\/v2\/posts\/3157\/revisions"}],"wp:attachment":[{"href":"https:\/\/catbradley.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/catbradley.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/catbradley.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}