How to migrate from CentOS 8 to CentOS Stream

2023-02-02 By Nathan 11476 Views linux centos centosstream
7 reviews

CentOS Stream is a rolling-release distribution that serves as the upstream for the next version of Red Hat Enterprise Linux (RHEL). It is designed for developers, testers, and system administrators who are interested in exploring and contributing to the development of the Linux operating system. Unlike the stable CentOS release, which is based on a specific version of RHEL, CentOS Stream receives continuous updates and is intended to provide a midstream between the upstream development in Fedora and the downstream stability of RHEL.


The end-of-life for CentOS 8 was on 2021-12-31, which means that it is no longer actively maintained and receiving updates. This may also impact the availability of its repositories. It is recommended to use the below commands to enable CentOS repositories if any issues persist.


  1. Change the directory to /etc/yum.repos.d/.

    # cd /etc/yum.repos.d/
    

    centosstream1

  2. Use the following 2 commands to change the repositories.

    # sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
    
    # sed -i 's|#baseurl=[http://mirror.centos.org](http://mirror.centos.org/)|baseurl=[http://vault.centos.org](http://vault.centos.org/)|g' /etc/yum.repos.d/CentOS-*
    

    centosstream2

  3. Run an update on the server.

    # yum update -y
    

    centosstream3

  4. Check the OS and version detail.

    # cat /etc/centos-release
    

    centosstream4

  5. Install CentOS Stream Packages.

    # dnf install centos-release-stream -y
    

    centosstream5

  6. Change CentOS 8 repositories to CentOS Stream repositories.

    # dnf swap centos-{linux,stream}-repos -y
    

    centosstream6

  7. Sync all components to the new version using the following command.

    # dnf distro-sync -y
    

    centosstream7

  8. After syncing all components, reboot the server.

    # reboot
    

    centosstream8

  9. After rebooting, log in to the server and use the following command to check the updated OS version.

    # cat /etc/centos-release
    

    centosstream9


Related Tutorials

What do you think about this article?

Rate this article
LayerStack Promotion
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.