[Solved] Error: Failed to download metadata for repo ‘appstream‘

Solution:

1. Back up CentOS Linux baseos Repo file

mv CentOS-Linux-BaseOS.repo CentOS-Linux-BaseOS.repo.backup

2. Update baseos Repo file

 curl -o /etc/yum.repos.d/CentOS-Base.repo

3. Generate new Yum cache

yum makecache

Read More: