Thursday, October 6, 2022
Google search engine
HomeLinux TutorialsHow to rebuild /etc/yum.repos.d in CentOS

How to rebuild /etc/yum.repos.d in CentOS

If you remove all the files in /etc/yum.repos.d you may see this error.

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable 
 To enable custom repositories:
     yum-config-manager --enable 

I’ll show you How to rebuild /etc/yum.repos.d in CentOS
to solve this, you can check your version of CentOS to update the mirror

[[email protected] ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

or you can install redhat-lsb-core with command or find rpm package

yum install redhat-lsb-core

I recommend to backup your repository before change your repo

cp -ax /etc/yum.repos.d/* /root/backupMyrepo

and repair your repo with simple bash script

cheers!

YOU CAN SUPPORT DEVNINJA WITH A CUP OF COFFEE

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online. to search or browse the published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or more ) as a token of appreciation.

Support Us

DevNinja
DevNinja
A systems engineer with experience in systems administration, cloud computing, systems deployment, virtualization, containers
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

ten − 1 =

- Advertisment -
Google search engine

Most Popular

Recent Comments