Windows reinstall on dualboot PC

I have been using Fedora Workstation now for some time (since F36) but I still have a dualboot with WIndows 11, because I sometimes need to to stuff on WIndows. Now, since I still have this old Windows installation which takes most of the storage space and is getting slower due to installation and removal of programs leaving registry keys etc.

I originally had only Windows 11 → After the linux installation it made grub the default boot option with an entry to also boot Windows

Is there a safe way to reinstall Windows from a bootable usb stick without it breaking stuff? If I need to reinstall both how can I backup all the programs I have installed (since those are not saved in the /home partition)

Removed f36

If you have backups of your Linux Partition on a seperate drive, What is the issue? If you do not, and you are trying to reinstall Windows on the current partition, it will probably take out Grub but keep your / and /home in tact. You would need to use a Live USB to fix Grub again. It’s doable, but requires a lot of attention.

I do not have the linux partition backed up on a separate drive, but since I reinstall WIndows why not also Fedora I was thinking. And If I did a reinstall of both what would be the best way to save the names of the installed packages so I can easily reinstall them?

You can reinstall windows 11 from the microsoft USB image that you can download.
When you reinstall windows 11 it will reuse the existing windows partitions.
You can tell the reinstall to preserver the user files or zao them.
It will update the boot order in the EFI BIOS to boot into windows.
You can go into the EFI BIOS and change the boot order to set fedora (grub) as the default.

I think windows will leave the fedora partitions allow.
But I may be wrong and recommend you back up your fedora data.

If you want to reinstall Fedora you can, but I almost never do myself, as its so rare that it is required.

You can get a list of the RPMs installed on your system using rpm -qa.
You can also get a history of what install commands you ran that may be more useful dnf history.


Also, if flatpak’s are installed you can do flatpak list

1 Like

Ok, thanks. Do you know maybe if there is a way to also list the packages that are in a fresh F40 install so that I could eliminate those and have a smaller list to work through?

Could this be it?
dnf history userinstalled or dnf repoquery --userinstalled (found it in the man pages)

You really only need to back up application config files if you are at that point. How many applications and changes have you made to the system since the Fresh Install? If not many, then you don’t have too much to do. At his point your best bet is to go by the recommendation of :

The question is :

  • Have you done much change to the system since you did the fresh install ?
  • Do you have .bash_history , .bashrc , vimrc , neovim init , Bookmarks, Browser profiles , .mozilla , .librewolf , gpg and ssh to backup.
  • Themes ( often just a clone repo away. . . ) Personal files and other application configs

If not you are probably overthinking it.


It’s worth mentioning that dnf history won’t display the packages installed through Gnome Software. But then again, for those packages there is the Installed tab.

1 Like

Excellent point !

I think we naturally default to dnf but we do need to integrate Gnome Software into the mix, as more and more people are using it.

1 Like

Or make dnf or dnf5 a proper backend for Gnome Software and PackageKit in such a way that the dnf history would be the same whether using one or the other.

1 Like