Fedora Linux Server useful one liners -part 2

By | May 7, 2024

This is a continuation of the previous post about one liners from https://blog.voina.org/fedora-linux-server-useful-one-liners/

Updating to a new version – extra commands

In case the usual one liner does not work or there are some issues related to the upgrade, there are some additional things that can be done.

Make sure to have latest packages of the old release installed before system upgrade

Before trying the upgrade to a new release run the following to make sure you are up to date:

dnf upgrade --refresh

Make sure the previous release is repo is not corrupted before system upgrade

Sometimes you may end up with a corrupted Fedora release. My case was that on one server somehow the Fedora upgrade from F38 to F39 did not execute exactly perfect. I ended up with a system that had mixed packets from both releases. I did discovered the issue only when I tried to upgrade to F40.

The following command will try to fix the current version by bringing the correct repo files.

dnf distro-sync

If nothing else works force dnf to sync packages to the new release.

If you are not able even with the above to correctly upgrade using the system-upgrade dnf plugin then the following line will force sync the packages to a new release.

Make sure you do this only if you already tried the upgrade to the new release using the system-upgrade plugin and the packages are already downloaded.

dnf dystro-sync --releasever=40

Good luck !

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.