Solution to CentOS 8 AppStream Error

As explained here, Centos mirrors have been migrated to

Then the solution is:

cp -r /etc/yum.repos.d /etc/yum.repos.d.old
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=|baseurl=|g' /etc/yum.repos.d/CentOS-*
yum clean all
yum -y update

After this you can again use the yum command but you won’t received recent updates because Centos mirrors are not maintained anymore.

Alternative to Red Hat CentOS 8: Migrate to RockyLinux

If you want recent updates for your packages, then migrate to RockyLinux (before you should follow the script above).

Just follow this: or you can find it also here:

dnf install -y git
git clone
cd rocky-tools
cd migrate2rocky
chmod u+x
./ -r

That “-r” option tells the script to just go ahead and install everything.