Home How to fix yum errors on CentOS, RHEL or Fedora distributions
Post
Cancel

How to fix yum errors on CentOS, RHEL or Fedora distributions

Do you have issues when you are trying to update CentOS, Redhat Enterprise Linux or Fedora?

This can be caused by yum metadata that are obsolete or corrupt.

This is how you fix it, first I will show you what the error might look like below:

pr  5 11:34:46 on hvc0
[root@Host ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.crazyfrogs.org
 * extras: centos.crazyfrogs.org
 * updates: centos.crazyfrogs.org
http://centos.crazyfrogs.org/6.4/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://centose5.centos.org/centos/6.4/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://centosp3.centos.org/centos/6.4/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://centosp5.centos.org/centos/6.4/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://ftp.cica.es/CentOS/6.4/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

As you see in the above screen we have a lot of  “The requested URL returned error: 404 Not Found”, To fix this 404 errors you can clean yum metadata by typing the command below:

yum clean metadata
[root@host ~]# yum clean metadata
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
10 metadata files removed
3 sqlite files removed
0 metadata files removed

That worked magic.

You can also use the command:

yum clean all

You can check out more information about yum:

This post is licensed under CC BY 4.0 by the author.