Backup Software Selections

Hi There,

it might be a simple question, but to be honest, i have no idea how to accomplish this single Task. Searching through the web doesn’t led me into the right direction :frowning:

I’d like to save the current user installed Package selection to reinstall a new System with the same Software as the current one. It should be as simple as possible. It should go like this:

$ dnf export selection to ~/dnfselection.txt

So i install all the software on the target machine:

$ dnf import selection from ~/dnfselection.txt 

it should resolve all dependencies and print out files and repos, that can’t be installed, if they were removed renamed etc. That would be nice :slight_smile:

You are looking for dnf repoquery --qf "%{name}" --userinstalled, right?

You can pipe the output into a file

dnf repoquery --qf "%{name}" --userinstalled > packagelist.txt

There is also dnf history userinstalled but that includes version and release numbers, which may change between backup and restore.

2 Likes

@truster, i compare the output of the following command on both systems:

$ rpm --query --all