How To Fix Failed to Download Metadata for Repo ‘AppStream’ on CentOS 8

NetShop ISP
1 min readAug 23, 2022

--

The error message “Failed to Download Metadata for Repo ‘AppStream’” appears on CentOS 8 servers and you have probably encountered it if you tried to update the system (yum update).

[root@netshop-centos8-srv ~]# yum update
CentOS-8 - AppStream 110 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

In this tutorial we are going to show you how to fix this error and continue normally with updating your CentOS 8 server.

Step 1 — Go to /etc/yum.repos.d/ directory

Execute the following command in bold:

[root@netshop-centos8-srv ~]# cd /etc/yum.repos.d/

Step 2 — Run the following sed commands

[root@netshop-centos8-srv ~]# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
[root@netshop-centos8-srv ~]# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Step 3 — Now run Yum Update

[root@netshop-centos8-srv ~]# yum update -y

That’s it!

Source: https://netshop-isp.com.cy/blog/how-to-fix-failed-to-download-metadata-for-repo-appstream-on-centos-8/

--

--

NetShop ISP
NetShop ISP

Written by NetShop ISP

Web Hosting, Servers, Colocation & Data Center Services (www.netshop-isp.com.cy)

No responses yet