« Go Back

How to Fix Error: Failed to Download Metadata for Repo ‘AppStream’ centOS 8 Print

  • centos, centos 8, metadata, appstream, failed, download metadata vault, mirror, fix, update
  • 25

After Dec 31st, 2021, to update your CentOS installation, you are required to change the mirrors to CentOS Vault Mirror, where they will be archived permanently.

Fix Error: Failed to Download Metadata for Repo ‘AppStream’


To fix the above error, open your terminal or login via ssh, and run the following commands to change the repo URL to point to vault.centos.org, from the official CentOS repos.

Here we use the sed command to edit the required directives or parameters in the repo configuration files:

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


Now you should be able to update CentOS or install packages without any error.


Was this answer helpful?