How to solve “Failed to download metadata for repo ‘pgdg94’ “?
OS: Cent OS 8
Task: check if there is security update then update security only if there is any security update
problem to solve:
Run ‘yum –security check-update’ to see if there is any security update
if there is, run ‘yum –security update’ to update security patches only.
You got Failed to download metadata for repo ‘pgdg94’ error.
How to solve it?
Run following commands as root or by sudo:
modify pgdg-redhat-all.rpo by not enabling pgdg94 (Assume that you probably don’t use pg94. Now CentOS 8 supports pg up to 12):
cd /etc/yum.repos.d/
vi pgdg-redhat-all.repo:
find [pgdg94] and change enabled=1 to enabled=0
clean out cache and do upgrade:
dnf clean all
rm -Rf /var/cache/dnf
dnf upgrade --allowerasing --skip-broken --nobest
Here you go!