
# Backup only system-installed apps
flatpak list --system --app --columns=ref > flatpak-apps-system.txt
Table of Contents
1. Exporting your Flatpak apps
If you’d like to take this to the next level, here’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’ll be able to rebuild your app environment in minutes.
For single-user systems
# Export Flatpak overrides to a file
flatpak override --show > flatpak-overrides.txt
flatpak list --app --columns=installation,ref > flatpak-apps.txt
For a multi-user setup
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.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 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’ve installed dozens over time.
I hope you find it useful 😄flatpak remotes --columns=name,url > flatpak-remotes.txt
# Install Flatpak
sudp apt -y install flatpak
3. Recreating your setup on the new system
If you’ve saved your Flatpak overrides, you can restore them by running:crontab -e
#!/bin/bash
flatpak list --app --columns=installation,ref > ~/flatpak-apps.txt
flatpak remotes --columns=name,url > ~/flatpak-remotes.txt
flatpak override --show > ~/flatpak-overrides.txt
echo "Flatpak backup completed on $(date)" >> ~/flatpak-backup.log
Next, copy any user-installed Flatpaks. You’ll need to do this for every user individually. Have each user run this to backup their personal installations.flatpak list --user --app --columns=ref > flatpak-apps-user-$USER.txt
0 10 * * SUN ~/bin/flatpak-backup.sh
Flatpak app data, like configuration files and saved sessions, is stored in ~/.var/app/. 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.
Create a simple script (e.g., ~/bin/flatpak-backup.sh):chmod +x ~/bin/flatpak-backup.sh
I assume that you’re transferring your apps to another system. If that’s not the case, you can skip this step.# Restore Flatpaks:
while read -r inst ref; do
if [ "$inst" = "user" ]; then
flatpak install -y --user "$ref"
else
flatpak install -y --system "$ref"
fi
done < flatpak-apps.txt
On the system where you’ve got all your apps, you’ll first want to save a list of your installed apps as Flatpak “refs”, including where each one is installed. Flatpaks can be installed either system-wide (and thus available to all users) or per-user. The process is different depending on whether you’re running a single-user set up, or if you have to back up and restore for multiple users.
Reinstalling your apps
Once you’ve added your Flatpak remotes, you can now reinstall all your apps to their original locations:You can also backup and restore Snap packages in similar function.You now know how to quickly back up and migrate your Flatpak apps between systems in a clean, scriptable. It’s lightweight, doesn’t require extra tools, and makes distro hopping or system rebuilds much easier.
Restoring overrides (optional)
You can even backup and restore your settings on another system.Sure, you could list and reinstall everything manually, but that’s tedious work, and easily prone to human error. Fortunately, there’s 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.To do this, you can run the following command:# Restore your Flatpak Overrides
while read -r line; do
# Skip empty lines and comments
[[ -z "$line" || "$line" =~ ^# ]] && continue
flatpak override $line
done < flatpak-overrides.txt
Optional bonus for advanced users: Automating your setup
This assumes you have no other users on your system. Backup both user and system apps you have access to.# Check if Flatpak is installed
flatpak --version

flatpak list --app
For example, for GIMP, you can copy ~/.var/app/org.gimp.GIMP.ℹ️# Add saved Flatpak remotes
while read -r name url; do
flatpak remote-add --if-not-exists "$name" "$url"
done < flatpak-remotes.txt
If you’re planning on migrating to a fresh installation of Ubuntu, you’ll need to install Flatpak first:
