// How to migrate CentOS 8 to CentOS 8 Stream

CentOS 8 went EOL at the end of December 2021. There was no automatic migration to CentOS Stream 8 (which will receive updates till end of May 2024). The following describes how to migrate an existing CentOS 8 installation to CentOS 8 Stream:1)

  1. As the content of the CentOS 8 repositories has been moved to vault.centos.org a few days ago, any dnf package operation probably results in “Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist”. If so, swap to the Stream repos first:
    sudo dnf --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
  2. Do the migration:
    sudo dnf install centos-release-stream
    sudo dnf swap centos-{linux,stream}-repos
    sudo dnf distro-sync
    cat /etc/centos-release

That's it. On a typical minimal installation, this will replace round about 600 packages.

Additionally, it might make sense to replace third party repositories with a module (→ dnf module list, dnf module info <modulename>). The following example replaces remi-php74 with Stream's php:7.4 module:

  • Identify the packages installed from the repository to replace:
    dnf list installed | grep @remi-php74

    Remove these packages bit by bit with sudo dnf remove.

  • Disable the repo (or just delete the fitting .repo file below /etc/yum.repos.d/):
    yum-config-manager --disable remi-php74
  • Enable the module:
    sudo dnf module install php:7.4
    dnf module list --installed
  • List the packages provided by the module:
    dnf module info php:7.4

    Now reinstall the packages you need.

1)
Please do so as soon as possible, this probably won't work forever and you are already not receiving any updates at this point in time! I found such a pet-server-box in a customer environment yesterday, therefore this posting…
I'm no native speaker (English)
Please let me know if you find any errors (I want to improve my English skills). Thank you!
QR Code: URL of current page
QR Code: URL of current page start (generated for current page)