Hey @crazyoldguy, I had a few minutes today so decided to give you a procedure to do this. It’s dirty, I’m sure that there is an easier way to do all of this. This is just the reinstall of the packages portion. I already talked about creating the installed.txt
file above.
dnf list installed > installed.txt
This file will have some unwanted content. All you want is the package name, which is in column 1. To get this, you can use awk
to get only column 1’s data. Here I’m outputting to a new file (new_installed.txt), but there may be a way to do this in place, but this is what I did:
awk '{print $1}' installed.txt > new_installed.txt
Now there one item at the top of the file “Installed” which comes from the dnf list installed
command. You don’t want that, so remove it with:
sed -i 's/Installed//g' new_installed.txt
This leaves a blank line, which may or may not cause a problem, but to be sure, you can just remove that with another sed
run:
sed '/^$/d' new_installed.txt > installed.txt
Now everything is as it should be in the installed.txt
file, so copy it off for safe keeping.
Reinstall and get the machine back with all of the repositories as mentioned in the first reply, and then copy your installed.txt
file over to the new machine, and run:
sudo dnf upgrade
This just gets everything that has been updated since creating the .iso image. Now populate your machine with the installed.txt
file:
dnf -y install $(cat installed.txt)
When you are done, you will have all of the packages back.
Sorry I didn’t just hash this all out a few days ago when you originally posted.
Thanks,
Steve