Moving from Nvidia GPU to AMD GPU Question

I’m currently running Fedora 43 Workstation and I have an Nvidia RTX 2060, with that I am using the proprietary drivers. I’m going to be upgrading to an AMD RX 9060 XT and I know that the AMD card will not need proprietary drivers installed, what would be the best command to run to cleanly remove the Nvidia drivers without removing any packages that are necessary for the system?

I have used sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware and it works well.
Do that while the system is booted for the last time before removing the nvidia gpu.

Thank you I will do that on the last boot before I remove it.

You can also do it after removing the card if that is easier.

also make sure that amd-gpu-firmware is installed. It’s installed by default, but you might have removed it.
run ‘dracut -f’ to recreate the initramfs image when successfully booted with the new GPU. This will remove the nouveau driver + nvidia FW and add amdgpu driver + amd FW to the initramfs image.

Note that preserving the nvidia-gpu-firmware package could be useful if the new dGPU has issues and user needs to revert to the Nvidia card.