LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2015, 08:09 PM   #1
itsallgood
LQ Newbie
 
Registered: Jan 2015
Posts: 26

Rep: Reputation: Disabled
Deleted all of the repos in yum.repos.d, how to restore them?


Hi all,

New to the forums, and new to Linux. Learning the best way I know how, and that's finding things to mess up and spending time to try to fix them. Tonight I decided to see what would happen if I deleted all of my repos from the yum.repos.d directory. Now, I can't seem to find out how to get the default repositories back, and can't find anything on Google. I'm on CentOS 6.5. How can I get the default repos back that came with the original installation? Thank you.
 
Old 02-02-2015, 08:26 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,784

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Code:
yum reinstall http://vault.centos.org/6.5/os/x86_64/Packages/centos-release-6-5.el6.centos.11.1.x86_64.rpm
That's for a 64-bit OS. For the 32-bit version:
Code:
yum reinstall http://vault.centos.org/6.5/os/i386/Packages/centos-release-6-5.el6.centos.11.1.i686.rpm
Once you get that done, do run "yum update" to bring your system up to the current release (6.6).

Last edited by rknichols; 02-02-2015 at 08:27 PM.
 
Old 02-02-2015, 08:54 PM   #3
itsallgood
LQ Newbie
 
Registered: Jan 2015
Posts: 26

Original Poster
Rep: Reputation: Disabled
Much appreciated. When I paste that in the terminal I get the following output:

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Reinstall Process
Examining /var/tmp/yum-root-IgUjfr/centos-release-6-5.el6.centos.11.1.x86_64.rpm: centos-release-6-5.el6.centos.11.1.x86_64
No package matched to remove: centos-release-0:6-5.el6.centos.11.1
Error: Problem in reinstall: no package matched to remove
 
Old 02-03-2015, 04:15 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
This is my Centos-Base repo defn; you could try this
Code:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1


#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
priority=1

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
 
Old 02-03-2015, 10:17 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,784

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by itsallgood View Post
Much appreciated. When I paste that in the terminal I get the following output:

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Reinstall Process
Examining /var/tmp/yum-root-IgUjfr/centos-release-6-5.el6.centos.11.1.x86_64.rpm: centos-release-6-5.el6.centos.11.1.x86_64
No package matched to remove: centos-release-0:6-5.el6.centos.11.1
Error: Problem in reinstall: no package matched to remove
Then you are not running CentOS 6.5. If you haven't already recovered by using chrism01's suggestion, run "rpm -q centos-release". If it's "centos-release-6-6.el6", then you just need to reinstall that package:
Code:
yum reinstall http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-6.el6.centos.12.2.x86_64.rpm
or
Code:
yum reinstall http://mirror.centos.org/centos/6/os/i386/Packages/centos-release-6-6.el6.centos.12.2.i686.rpm

Last edited by rknichols; 02-03-2015 at 10:20 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
puppet repos vs redhat repos srinishrews Linux - Newbie 1 10-29-2014 06:49 PM
Unable to update repos in CentOS 5.6 yum.repos.d!!!!! Explore_Linux Linux - Newbie 1 09-28-2011 04:20 AM
mistake deleted yum.repos.d av.dubey Linux - Newbie 2 07-20-2009 06:59 PM
yum repos? zahadumy Fedora 10 01-10-2007 05:46 PM
Other yum repos? hamtavs Fedora 1 12-20-2006 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration