On 10/14/25 5:30 PM, Samuel Sieb wrote:
On 10/14/25 2:49 PM, Thomas Cameron via users wrote:
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
That only refreshes the database structure with the existing
information. That's not what was asked for.
If you read the manual page, it will rebuild the RPM database from the
*installed* package headers.
He said that the upgrade completed, and the correct packages are
installed. I also told him to make sure there were no orphaned packages
by following the post-upgrade steps on the Fedora web site (which you
deleted in your response).
If the packages showing up as F40 are not actually installed, a rebuild
would work. If there are actually packages installed from F40, then the
post-upgrade steps I pointed him to should clean those up.
So, yeah, this would work - if he followed the complete instructions I
posted.
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.
Again, not going to help if the rpm database is showing old rpms. That's
going to revert everything back to the F40 rpms in a really bad way.
Again, he indicated that the correct packages were installed. The kernel
and other packages are from F42. As I mentioned in my initial email,
once he has checked the upgrade steps, specifically the post-upgrade
steps to ensure there are no extra packages from pre-upgrade, this would
absolutely work. I've done it several times after failed dnf updates and
other weird stuff like that.
Cheers,
--
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