1

Rawhide was causing troubles, so I decided to remove it, I backed up my original repo list names. The original repo list looked like that

fedora-cisco-openh264.repo   rpmfusion-free.repo
fedora-rawhide.repo          rpmfusion-free-updates.repo
fedora.repo                  rpmfusion-free-updates-testing.repo
fedora-spotify.repo          rpmfusion-nonfree-rawhide.repo
fedora-updates.repo          rpmfusion-nonfree.repo
fedora-updates-testing.repo  rpmfusion-nonfree-updates.repo
google-chrome.repo           rpmfusion-nonfree-updates-testing.repo
rpmfusion-free-rawhide.repo

I removed few of them, thinking that by removing rawhide and testing repos, my system would only search for stable packages. By removing, I mean that I did rm /etc/yum.repos.d/repo and then dnf clean all, no other commands. My new repo list is:

fedora-cisco-openh264.repo  rpmfusion-free-updates.repo
fedora.repo                 rpmfusion-free-updates-testing.repo
fedora-spotify.repo         rpmfusion-nonfree-rawhide.repo
fedora-updates.repo         rpmfusion-nonfree.repo
google-chrome.repo          rpmfusion-nonfree-updates.repo
rpmfusion-free.repo         rpmfusion-nonfree-updates-testing.repo

Now, I can't do sudo dnf update, nor sudo dnf reinstall fedora-release. I get this error Error: Failed to synchronize cache for repo 'fedora'kB/s | 491 kB 41:01 ETA

My questions are:

  • Which repo I need to restore and how to restore it?
  • Are there any testing repos I can safely remove?
4

This is not a proper way of removing repositories, usually repositories comes from packages, so removing a repository is a matter of finding package it belongs to.

$ rpm -qf /etc/yum.repos.d/repository.repo

If repository file is belonging to some package upper command will tell what that package is.

Secondly, there is no need to remove anything, repositories can be disabled. You can use following command to tell what repositories are currently enabled.

$ sudo dnf repolist

You can use following command to disable a repository.

$ sudo dnf config-manager --set-disabled <repository>

Part to your question, that error message has nothing to do with missing repositories, and has something to do with network (dns, cache etc.).

Bare minimum repositories you should have enabled are fedora and fedora-updates.

  • ok so how to solve/debug the problem I'm having? – Lynob Feb 12 '17 at 12:15
  • 1
    Try to access URL directly e.g. from: $ fgrep '[fedora]' -A10 /etc/yum.repos.d/fedora.repo | grep metalink metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch Enter into your browser something like: mirrors.fedoraproject.org/… . You should get a file with a list of repositories, try to see if they work in the same way. – srakitnican Feb 12 '17 at 12:23
  • @srakitnican i keep getting No such file or directory. bash: arch‌​=: command not found... – Lynob Feb 12 '17 at 12:35
  • @sourcejedi If repository file is deleted, it will just be recreated with another update, disabling it on the other hand or modifying it will be respected by package manager. Package manager will create new configuration file with rpmnew extension in that case. – srakitnican Feb 12 '17 at 12:37
  • @Lynob My lines were all combined in comments, use following command: fgrep '[fedora]' -A10 /etc/yum.repos.d/fedora.repo | grep ^metalink. Then replace $releasever and $basearch from link with a proper values for your machine, for example 25 and x86_64. – srakitnican Feb 12 '17 at 12:41
0

I want to thank srakitnican for indicating that it's an error related to the mirrors. I ended up fixing it by adding fastestmirror=1 to /etc/dnf/dnf.conf. I'm going to accept his answer because his efforts helped me solve the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.