Distro-sync want to remove dnf5

sudo dnf distro-sync --allowerasing
Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
Problem: The operation would result in removing the following protected packages: dnf5
You can try to add to command line:
--skip-broken to skip uninstallable packages

when i run sudo dnf repoquery --duplicates, i have like 300 packages listed.

I updated to 44 recently, and i think i ran distro-sync sucefully after it. I have no idea what could have cause it.

sudo dnf history list
 ID Command line                                                                                               Date and time       Action(s) Altered
297 dnf distro-sync -y --refresh                                                                               2026-05-22 20:52:49              1077
296 dnf -y install --nogpgcheck --disablerepo=* /tmp/akmods.1WFQZfB7/results/kmod-VirtualBox-7.0.4-200.fc44.x8 2026-05-11 13:09:52                 1
295 dnf -y install --nogpgcheck --disablerepo=* /tmp/akmods.fxb5TiYP/results/kmod-nvidia-7.0.4-200.fc44.x86_64 2026-05-11 13:09:34                 1
294 dnf -y install --nogpgcheck --disablerepo=* /tmp/akmods.zVryLrqW/results/kmod-VirtualBox-7.0.4-200.fc44.x8 2026-05-11 12:18:15                 1
293 dnf system-upgrade download --releasever=44                                                                2026-05-11 12:02:30              7261
292 dnf -y install --nogpgcheck --disablerepo=* /tmp/akmods.1wTBX3I7/results/kmod-nvidia-6.19.13-200.fc43.x86_ 2026-05-11 11:27:55                 2
291 dnf -y install --nogpgcheck --disablerepo=* /tmp/akmods.Vo61bBc1/results/kmod-VirtualBox-6.19.13-200.fc43. 2026-05-11 11:26:29                 2
290 dnf -y install --nogpgcheck --disablerepo=* /tmp/akmods.WvBE0Mkn/results/kmod-VirtualBox-7.0.4-100.fc43.x8 2026-05-11 11:26:12                 1
289 dnf -y install --nogpgcheck --disablerepo=* /tmp/akmods.nzuaG4c6/results/kmod-nvidia-7.0.4-100.fc43.x86_64 2026-05-11 11:25:53                 1
288 dnf distro-sync -y --refresh                                                                               2026-05-11 11:20:12               472
287 dnf -y install --nogpgcheck --disablerepo=* /tmp/akmods.a4KeeBrI/results/kmod-VirtualBox-6.19.13-200.fc43. 2026-04-24 12:48:40                 1
286 dnf -y install --nogpgcheck --disablerepo=* /tmp/akmods.l0BCtqDJ/results/kmod-nvidia-6.19.13-200.fc43.x86_ 2026-04-24 12:48:23                 1
285 dnf distro-sync -y --refresh                                                                               2026-04-24 12:45:49               117

Try that as
sudo dnf distro-sync --refresh --allowerasing --setopt "protected_packages="
That should eliminate the many duplicate packages you noted.

You seem to have missed several upgrades since the kernel has had numerous updates so the latest is 7.0.9-205 and 7.0.10 is in updates-testing.
Most of the recent flurry of kernel updates has been due to recently identified security issues and the fixes for them.

You seem to have missed several upgrades since the kernel has had numerous updates so the latest is 7.0.9-205 and 7.0.10 is in updates-testing.

Yeah i didn’t think about that, i should fix this asap.

Try that as
sudo dnf distro-sync --refresh --allowerasing --setopt "protected_packages="
That should eliminate the many duplicate packages you noted.

It error with this message

[290/290] Total                                                                                                                                                                                                                                                        100% |   0.0   B/s |   0.0   B |  00m01s
Running transaction
Transaction failed: Rpm transaction failed.
  - file /usr/share/man/man5/cert9.db.5.gz from install of nss-3.123.1-1.fc44.i686 conflicts with file from package nss-3.122.1-1.fc44.x86_64
  - file /usr/share/man/man5/key4.db.5.gz from install of nss-3.123.1-1.fc44.i686 conflicts with file from package nss-3.122.1-1.fc44.x86_64
  - file /usr/share/man/man5/pkcs11.txt.5.gz from install of nss-3.123.1-1.fc44.i686 conflicts with file from package nss-3.122.1-1.fc44.x86_64
  - file /usr/share/doc/libedit/ChangeLog from install of libedit-3.1-59.20260512cvs.fc44.i686 conflicts with file from package libedit-3.1-58.20251016cvs.fc44.x86_64
  - file /usr/share/doc/librsvg2/NEWS from install of librsvg2-2.62.2-1.fc44.i686 conflicts with file from package librsvg2-2.62.0-1.fc44.x86_64
  - file /usr/share/licenses/librsvg2/LICENSE.dependencies from install of librsvg2-2.62.2-1.fc44.i686 conflicts with file from package librsvg2-2.62.0-1.fc44.x86_64
  - file /usr/share/doc/expat/Changes from install of expat-2.8.1-1.fc44.i686 conflicts with file from package expat-2.7.3-2.fc44.x86_64
  - file /usr/share/man/man1/xmlwf.1.gz from install of expat-2.8.1-1.fc44.i686 conflicts with file from package expat-2.7.3-2.fc44.x86_64

Those all appear to be an issue with the repo not being in sync as the i686 packages conflict with the x86_64 packages.

You might try adding --skip-broken to that command.

You also may just wait a few hours then try again.

I still have the same error

Try first to remove the .i686 packages with: dnf remove \*.i686

Note the list of removed packages (you may found then in the dnf history) to reinstall then afterwards if needed.

Retry the distro-sync.

Thanks, i can run distro sync now