How to Switch From CentOS 8 to CentOS Stream

Edit: Please check out Anthony Geoghegan's answer for the latest recommendations.

This should work as CentOS Stream is just additional repositories on top of CentOS 8 as mentioned on (unofficial)

I did this on my development machine:

$ dnf history centos-release-stream
ID     | Command line             | Date and time    | Action(s)      | Altered
   156 | update --allowerasing    | 2020-03-27 14:10 | E, I, U        |  127  <
   154 | install -y centos-releas | 2020-03-27 14:04 | Install        |    1 > 

Which resulted in the following enabled repositories

$ dnf repolist enabled | grep CentOS
AppStream                 CentOS-8 - AppStream
BaseOS                    CentOS-8 - Base
PowerTools                CentOS-8 - PowerTools
Stream-AppStream          CentOS-Stream - AppStream
Stream-BaseOS             CentOS-Stream - Base
Stream-extras             CentOS-Stream - Extras
centosplus                CentOS-8 - Plus
extras                    CentOS-8 - Extras
fasttrack                 CentOS-8 - fasttrack

I needed to get rid of some manually compiled packages (--allowerasing) though. I would not do this on a production server or without a functioning backup.

After, it was announced that CentOS 8 would no longer be supported (end-of-life on 31 December 2021), upgrading to CentOS Stream became the officially recommended path to continue to receive software updates (RPMs).

Here are the notes I made while following the instructions for Converting from CentOS Linux to CentOS Stream:

1. Install the CentOS-Stream release files.

dnf install centos-release-stream

This package installs the following files:


2. Replace the centos-linux repositories with centos-stream repositories:

dnf swap centos-{linux,stream}-repos

This replaces the following packages:




3. Update all packages to match the latest version available from all enabled repositories

sudo dnf distro-sync

For me, this installed a large number of packages, removed older kernel packages and downgraded the following packages:


However, it failed while attempting to upgrade the filesystem package and further attempts to run dnf update failed due to:

Error unpacking rpm package filesystem-3.8-4.el8.x86_64

This was because I had a filesystem mounted on /mnt. Unmounting this allowed the filesystem package to be upgraded and allowed the operation to complete successfully:

$ cat /etc/centos-release
CentOS Stream release 8

Note: I’ve only converted my own workstation to CentOS Stream. I have yet to replicate this procedure on a production server. :)