Restore Data on Zorin OS according to applications source (SNAP and others)

Hi and have a nice 2025 year.
I hope, my title is clear :slight_smile:

I am installing Zorin OS 17.2 on my personal computer (Dell G3 3500) and I have backed up my data from Ubuntu 24.04.1. My previous OS.

In this previous installation, applications come from SNAP, AppImage, deb...
For instance, Thunderbird has been installed with SNAP.
Kdenlive is from AppImage...

Is there a way to have the applications to be installed (automatically or by a command) according to the sources of this restored data?

Or a way to get the installed applications source and to reproduce this profile in my new OS for an automated installation?

Thank you for your feedback.

Have a nice 2025 year.

José, from France.

I don't think this is possible. You have them to be installed manually.

1 Like

Happy new year yourself!

The key point to understand here is that configuration files should only be relevant to their respective programs, and not to the package format that you installed it. That is, your Thunderbird settings should work the same regardless of how Thunderbird is installed in your system. Therefore, it's not possible to extrapolate from the configuration file alone what is the underlying package format that was used to install it.

However, you can run a few commands to learn where certain applications are installed from:

# Debian packages installed
apt list --installed

# Snap packages installed
snap list

# Flatpak packages installed
flatpak list

AppImages are self-contained binary files so you can just copy them over as they are.

For the rest, you can write a simple shell script that can go through the applications that you are interested in installing, and do just that. However, you do need to learn at least the basics of shell scripting, and you will most likely run into inconsistencies when moving from one system to another that you need to account for in your script.

1 Like

Hi @Michel @zenzen
thank you for your feedback.

@zenzen
Thank you for these commands
Please, note they returned:

  • apt: 1,174 items!!!
  • snap: 67 items
  • flatpak: 76 items (I am surprised to see Gnome and NVIDIA files)
  • Only one AppImage in my ~/Applications repertory
    (It seems to me there are other platforms like these :).

I wonder if it is possible to limit these lists to the "Apps" in Ubuntu Software :).

That is the point. Why OS developers do not propose this kind of application?
A file to collect the application profile on your previous system, and a command to replicate this profile on your new system.
This will ease the implantation of Zorin for non-developers.

Thank you for your time.

José.

1 Like

Writing a script that will installed certain software in your system is very easy to do. The problem comes with automatically identifying which software needs to be installed.

In Linux, there are many ways of installing software in your system: official repositories, third-party repositories, Flathub, Snapcraft, AppImages, tarballs, compiled from source, applications managed by additional package managers such as Python's pip, Node.js' npm, and so on and so forth.

What's more, installing form the same source but in different ways will generate different log entries. For example, running sudo apt install <something> is effectively equivalent to installing that same package from the Software Store (selecting Zorin OS as the source so it uses the Debian package) but the log file will look very different. This makes the task of identifying what the user installed much more difficult.

Keep in mind that as a distribution developer, you can't predict how people are going to be using their systems. Some people don't like Snaps, some people don't like Flatpak, etc. You'd have to account for all possible cases, otherwise people will start complaining about their use case not being covered.
It gets even trickier with AppImages, since they don't have a dedicated package manager, and the source of the download is unknown. Even if you write it down as per my suggestion, this is prone to change if the website changes hosts or whatever. I'm sure there are other gotchas to work around depending on the package manager.

So, yeah, long story short, it's just a lot easier for you to keep track of what you have installed yourself, and include that in a shell script to automate the task.

I'd be happy to help you set something up, however, I just can't promise I'll do it right away.

1 Like

@zenzen
Perhaps, this is the solution...

dpkg --get-selections > ~/packages 

and then restore it on the new one with

sudo dpkg --set-selections < ~/packages && apt-get dselect-upgrade.

Found this here: How do you track which packages were installed on Ubuntu (Linux)? - Super User


Update.

And this

sudo apt update
sudo dselect update
sudo dpkg %%--set-selections%% < liste-des-paquets
sudo apt -u dselect-upgrade

From this site in French: tutoriel:comment_sauver_et_restaurer_la_liste_des_paquets [Wiki ubuntu-fr]

Title can be translated as: How to save and restore the package list) Exactly, what I am looking for!

I am going to test it on my PC test :).

José

Yeah, that will work. Keep in mind, however, that this command will return the same output as apt list --installed, and it will install every package, not just what you have installed yourself. This is not necessarily a bad thing, but just something to be aware of. Also, it will not include packages from other sources i.e: Flathub, AppImages, etc.

1 Like

Also take a note of this

if the repositories between the two machines are different, all bets are off.

3 Likes