On 10/12/25 5:00 PM, Franta Hanzlík via users wrote:
Today I did a dnf system-upgrade of the server from Fedora 40 x86_64
to Fedora 42. The upgrade went seemingly well, the system booted and
seems to be working, the kernel and other packages are probably from
Fedora 42.
But what's crazy and I can't explain it - the RPM database shows
the original packages from Fedora 40 - there are none from Fedora 42.
I couldn't find another and up-to-date RPM database anywhere on the
disk.

Can anyone advise the easiest way to reconstruct the RPM database?

Others have talked about where the RPM database should be and "run out of space" scenarios.

But if you REALLY want to rebuild the database, you should be able to run:

rpm --rebuilddb

Read the man page for rpmdb(8) for some tips and tricks.

Worst case, you can force a reinstall of ALL packages with:

dnf5 -y reinstall *

This will also rebuild the RPM database. Note that this is a giant sledgehammer approach, but I've done this a handful of times for various reasons. It's been successful every time, but no guarantees.

Before you do this, you should definitely make sure there aren't any leftover RPMs from the previous version using the post-upgrade tasks at https://docs.fedoraproject.org/en-US/quick-docs/upgrading-fedora-offline/

--
Thomas
--
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to