Failed to download metadata for repo ‘AppStream’

We're writing the tutorial to fix the issue of the mentioned title, because, one of our clients reported to us, he is unable to install any software on his server. When he provided us the root access, we found that the AppStream repo was causing the issue.

"CentOS Linux 8 had reached the End Of Life (EOL) on December 31st, 2021". It means that CentOS 8 will no longer receive development resources from the official CentOS project, after Dec 31st, 2021.

So we go-ahead to change the mirrors of CentOS 8 to where they will be archived permanently. Here's how we did the process:

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

cd /etc/yum.repos.d/

Step 2: Run the below commands

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=|baseurl=|g' /etc/yum.repos.d/CentOS-*

Step 3: Now run the yum update

yum update -y

That’s it!

  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

How to restrict direct root access in Linux

We can do it just in two steps. Step One: At first we will create new root user as follows (for...

How to extract .tar.gz files in Linux/UNIX OS

A tarball is a group of files that are bundled together using the tar command. Use the...

How to add welcome message when SSH start?

You need to change the contents of /etc/motd. Unfortunately, by default, /etc/motd is a link to...

How to change root password when SSH logged in

Run the following command: passwd Now type your new passwordOnce done, retype new passwordDone!...

How to install Pinguzo on any Linux/UNIX OS

Login to Pinguzo panel using Softaculous account or create an account of Pinguzo To add new...