Error running distro-sync for kmod-nvidia

I was using Fedora 41 beta. I updated my system, rebooted, and when i run distro-sync, i get this error:

> sudo dnf distro-sync -y --refresh
Updating and loading repositories:
 Copr repo for niri owned by yalter                                                                         100% |   8.2 KiB/s |   1.5 KiB |  00m00s
 RPM Fusion for Fedora 41 - Nonfree - NVIDIA Driver                                                         100% |  23.9 KiB/s |   7.6 KiB |  00m00s
 Fedora 41 - x86_64 - Updates                                                                               100% | 130.9 KiB/s |  21.3 KiB |  00m00s
 Fedora 41 - x86_64                                                                                         100% | 162.9 KiB/s |  22.3 KiB |  00m00s
 RPM Fusion for Fedora 41 - Free                                                                            100% |  23.4 KiB/s |   8.1 KiB |  00m00s
 Fedora 41 openh264 (From Cisco) - x86_64                                                                   100% |  11.5 KiB/s | 989.0   B |  00m00s
 RPM Fusion for Fedora 41 - Free - Updates                                                                  100% |  16.9 KiB/s |   7.2 KiB |  00m00s
 Copr repo for cosmic-applets-unofficial owned by wiiznokes                                                 100% |   4.2 KiB/s |   1.5 KiB |  00m00s
 RPM Fusion for Fedora 41 - Nonfree - Steam                                                                 100% |  10.3 KiB/s |   7.3 KiB |  00m01s
 RPM Fusion for Fedora 41 - Nonfree - Updates                                                               100% |  81.8 KiB/s |   7.4 KiB |  00m00s
 Copr repo for cosmic-epoch owned by ryanabx                                                                100% |  12.3 KiB/s |   1.5 KiB |  00m00s
 RPM Fusion for Fedora 41 - Nonfree                                                                         100% |  76.8 KiB/s |   8.1 KiB |  00m00s
 Terra 41                                                                                                   100% |   5.0 KiB/s |   1.3 KiB |  00m00s
 Visual Studio Code                                                                                         100% |  18.4 KiB/s |   1.5 KiB |  00m00s
Repositories loaded.
Échec de la résolution de la transaction:
Problème 1 : installed package kmod-nvidia-6.11.4-301.fc41.x86_64-3:565.57.01-1.fc41.x86_64 requires nvidia-kmod-common >= 3:565.57.01, but none of the providers can be installed
  - xorg-x11-drv-nvidia-3:565.57.01-2.fc41.x86_64 n'appartient pas à un dépôt distupgrade
  - problem with installed package
 Problème 2 : installed package xorg-x11-drv-nvidia-3:565.57.01-2.fc41.x86_64 requires nvidia-modprobe(x86-64) = 3:565.57.01, but none of the providers can be installed
  - installed package kmod-nvidia-6.11.5-300.fc41.x86_64-3:565.57.01-1.fc41.x86_64 requires nvidia-kmod-common >= 3:565.57.01, but none of the providers can be installed
  - nvidia-modprobe-3:565.57.01-1.fc41.x86_64 n'appartient pas à un dépôt distupgrade
  - problem with installed package
You can try to add to command line:
  --skip-broken to skip uninstallable packages

Try removing the kmod-nvidia package first.
Now try the distro sync.

Then it’s likely worthy while doing sudo akmods --rebuild --force to make sure that nvidia driver is built against distro-sync’ed state of your system.

I think i found the problem, i was using a version of nvidia that was only available in the beta rpm fusion repo. I fixed it by adding --allowerasing and it retrograded it automatically