Ask Your Question
5

Restore fedora official repository files

asked 2013-10-30 02:55:55 -0500

niyasc gravatar image

updated 2015-06-26 00:40:04 -0500

davidva gravatar image

If I accidentally delete fedora repo files, how can I restore them? In fact I deleted fedora-test-update repo from fedora 20 alpha. How can I get it back?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
4

answered 2013-10-30 04:32:17 -0500

remjg gravatar image

updated 2013-10-30 04:46:31 -0500

I'm new to Fedora, but I think one of the following command run as root will work:

  • 32 bits:

    yum-config-manager --add-repo=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/20/i386/

  • 64 bits:

    yum-config-manager --add-repo=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/20/x86_64/

Otherwise, you could try to copy paste my own /etc/yum.repos.d/fedora-updates-testing.repo file:

  • Type as root : gedit /etc/yum.repos.d/fedora-updates-testing.repo
  • Paste the content of my .repo file below and save.
  • Update the database and see if it's working: yum check-update

My fedora-updates-testing.repo file (fedora 20):

[updates-testing]
name=Fedora $releasever - $basearch - Test Updates
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/$releasever/$basearch/
metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

[updates-testing-debuginfo]
name=Fedora $releasever - $basearch - Test Updates Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/$releasever/$basearch/debug/
metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-debug-f$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

[updates-testing-source]
name=Fedora $releasever - Test Updates Source
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/$releasever/SRPMS/
metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-source-f$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
edit flag offensive delete link more
3

answered 2013-10-30 05:02:23 -0500

rickhg12hs gravatar image

You could reinstall the repo definitions using yum.

# yum reinstall fedora-release
edit flag offensive delete link more

Comments

... As long as you still have a repo definition for fedora or fedora-updates. Otherwise, manually download the rpm from a repo and install that locally.

rickhg12hs gravatar imagerickhg12hs ( 2013-10-30 05:06:04 -0500 )edit
1

answered 2013-10-30 04:43:21 -0500

FranciscoD_ gravatar image

Grab the fedora-release package from any mirror and reinstall it. That should get your repo files back.

edit flag offensive delete link more
0

answered 2015-06-26 00:38:56 -0500

davidva gravatar image

I reopen the question, because In Fedora 21 and 22; if you install "fedora-release" or "fedora-flavors", you can't restore the official repositories, then you need reinstall "fedora-repos"

Step 1: Download the specific fedora-repos for you Fedora

http://koji.fedoraproject.org/koji/packageinfo?packageID=18771

Step 2: Reinstall fedora-repos

dnf -y reinstall fedora-repos-*.noarch.rpm

Also Do you deleted Rpmfusion?

dnf -y reinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-10-30 02:55:55 -0500

Seen: 34,133 times

Last updated: Jun 26 '15