High Performance Starts Here — AMD Dedicated Servers

English

Home

Blog

How To Fix Error Failed to download meta...

How To Fix Error Failed to download metadata for repo in CentOS 8

How To Fix Error Failed to download metadata for repo in CentOS 8

NetShop ISP

NetShop ISP · Blog Author

Mar 23, 2023 · Technical Tutorials

The CentOS 8 distribution has been on End of Life (EOL) status since December 31st, 2021. This means that servers using CentOS 8 Operating system are no longer receiving development resources from the official CentOS project.

A common error that system admins encounter when trying to install a new package or update CentOS 8 is the following:

Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

To resolve this error you need to change the mirrors to vault.centos.org. Follow the next steps for the list of commands you need to execute on your CentOS 8 server to fix this.

Step 1 – Go to the /etc/yum.repos.d/ directory

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

Step 2 – Execute the ‘sed’ command. Sed is a popular linux command for finding & replacing strings in a file

[root@centos8-server ~]# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

and then this command:

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

Step 3 – You are all set, now try updating your system with the following command:

[root@centos8-server ~]# yum update -y

If all went well, the last command should have not returned any errors.

centos
how to
linux
tutorials
Press Releases
97

Free VPS Trial

No Credit Card Required.

Start Your VPS Hosting Free Trial

Recent Posts

Hermes AI Agent VPS - Deploy in 1 Click

Introducing Hermes Agent VPS: Your Own AI Agent, Live in One Click

22 July 2026

How To Protect Your Website from DDoS Attacks in 2026

How To Protect Your Website from DDoS Attacks in 2026

14 July 2026

Why Your Stream Keeps Buffering (And How to Fix It)

Why Your Stream Keeps Buffering (And How to Fix It)

08 July 2026

How to Secure Your WordPress Website in 2026

How to Secure Your WordPress Website in 2026

30 June 2026

How To Fix Outdated Theme on cPanel / WHM

Why Your cPanel or WHM Login Page Is Showing an Outdated Theme (And How to Fix It)

22 June 2026