Wiped /etc/yum.repos.d - no more 'dnf update'

,

Hi, fellow Fedora users,

Short story:

After installing the kwizart,/kernel-longterm-6.6 , my /etc/yum.repos.d was wiped and I can’t update the system anymore. I’d like to get my repos back and in sync with the system. Fedora 40 Workstation.

Long story:

This is all is left of my repos after installing a LTS kernel

$ ll /etc/yum.repos.d/
total 4
drwxr-xr-x 1 root root  128 30 nov 11:46 .
drwxr-xr-x 1 root root 6356 25 nov 09:44 ..
-rw-r--r-- 1 root root  424 25 nov 09:42 _copr:copr.fedorainfracloud.org:kwizart:kernel-longterm-6.6.repo

Unfortunately my full backup was made after the event. All I have as info is ‘less /var/log/dnf.librepo.log’. This is what I think my repo list was before the event.

2024-11-24T09:47:36-0500 INFO Librepo version: 1.19.0 with CURL_GLOBAL_ACK_EINTR support (libcurl/8.6.0 OpenSSL/3.2.2 zlib/1.3.1.zlib-ng libidn2/2.3.7 nghttp2/1
.59.0)
2024-11-24T09:47:41-0500 INFO Downloading: https://mirrors.fedoraproject.org/metalink?repo=updates-released-f40&arch=x86_64
2024-11-24T09:47:41-0500 INFO Downloading: https://us.mirrors.cicku.me/fedora/linux/updates/40/Everything/x86_64/Packages/b/blivet-gui-runtime-2.6.0-1.fc40.noar
ch.rpm
2024-11-24T09:47:41-0500 INFO Downloading: https://us.mirrors.cicku.me/fedora/linux/updates/40/Everything/x86_64/Packages/s/strace-6.12-1.fc40.x86_64.rpm
2024-11-24T09:57:24-0500 INFO Librepo version: 1.19.0 with CURL_GLOBAL_ACK_EINTR support (libcurl/8.6.0 OpenSSL/3.2.2 zlib/1.3.1.zlib-ng libidn2/2.3.7 nghttp2/1
.59.0)
2024-11-24T09:57:24-0500 INFO Downloading: https://download.copr.fedorainfracloud.org/results/chriscowleyunix/better_fonts/fedora-40-x86_64/repodata/repomd.xml
2024-11-24T09:57:25-0500 INFO Downloading: https://download.copr.fedorainfracloud.org/results/elxreno/preload/fedora-40-x86_64/repodata/repomd.xml
2024-11-24T09:57:25-0500 INFO Downloading: https://download.copr.fedorainfracloud.org/results/phracek/PyCharm/fedora-40-x86_64/repodata/repomd.xml
2024-11-24T09:57:25-0500 INFO Downloading: https://brave-browser-rpm-release.s3.brave.com/x86_64/repodata/repomd.xml
2024-11-24T09:57:25-0500 INFO Downloading: https://packages.freedom.press/yum-tools-prod/dangerzone/f40/repodata/repomd.xml
2024-11-24T09:57:25-0500 INFO Downloading: https://mirrors.fedoraproject.org/metalink?repo=fedora-40&arch=x86_64
2024-11-24T09:57:26-0500 INFO Downloading: https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-40&arch=x86_64
2024-11-24T09:57:26-0500 INFO Downloading: https://mirrors.fedoraproject.org/metalink?repo=updates-released-f40&arch=x86_64
2024-11-24T09:57:27-0500 INFO Downloading: https://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/repomd.xml
2024-11-24T09:57:27-0500 INFO Downloading: https://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/repomd.xml
2024-11-24T09:57:28-0500 INFO Downloading: https://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/primary.xml.gz
2024-11-24T09:57:28-0500 INFO Downloading: https://download.copr.fedorainfracloud.org/results/bgstack15/palemoon/fedora-40-x86_64/repodata/repomd.xml
2024-11-24T09:57:28-0500 INFO Downloading: https://mirrors.rpmfusion.org/metalink?repo=free-fedora-40&arch=x86_64
2024-11-24T09:57:28-0500 INFO Downloading: https://mirrors.rpmfusion.org/metalink?repo=free-fedora-updates-released-40&arch=x86_64
2024-11-24T09:57:28-0500 INFO Downloading: https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-40&arch=x86_64
2024-11-24T09:57:29-0500 INFO Downloading: https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-nvidia-driver-40&arch=x86_64
2024-11-24T09:57:29-0500 INFO Downloading: https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-steam-40&arch=x86_64
2024-11-24T09:57:29-0500 INFO Downloading: https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-updates-released-40&arch=x86_64
2024-11-24T09:57:30-0500 INFO Downloading: https://repo.vivaldi.com/archive/rpm/x86_64/repodata/repomd.xml

and /var/cache/dnf

$ dirod /var/cache/dnf
total 11560
-rw-r--r-- 1 root root        0 17 oct  2023 .gpgkeyschecked.yum
drwxr-xr-x 1 root root       16 18 oct  2023 commandline-4484d2478c96ca59
-rw-r--r-- 1 root root        2  5 déc  2023 tempfiles.json
drwxr-xr-x 1 root root       16 13 fév  2024 fedora-modular-e4e5804bdcdd96e7
drwxr-xr-x 1 root root       16 13 fév  2024 updates-modular-29738c1a65877bb4
drwxr-xr-x 1 root root       32 13 fév  2024 copr:copr.fedorainfracloud.org:elxreno:preload-d662234af4ab0e70
drwxr-xr-x 1 root root       16 13 fév  2024 copr:copr.fedorainfracloud.org:bgstack15:palemoon-4ecb8f9c20e85a7c
drwxr-xr-x 1 root root       16 13 fév  2024 copr:copr.fedorainfracloud.org:elxreno:preload-9aec6442a16a4ca5
drwxr-xr-x 1 root root       16 13 fév  2024 copr:copr.fedorainfracloud.org:phracek:PyCharm-eeb91f1b3b059990
drwxr-xr-x 1 root root       32 13 fév  2024 dangerzone-2a86075ec363b58e
drwxr-xr-x 1 root root       32 13 fév  2024 copr:copr.fedorainfracloud.org:bgstack15:palemoon-7d3193173f585f36
drwxr-xr-x 1 root root       16 13 fév  2024 commandline-f545b396869dd428
drwxr-xr-x 1 root root       16 18 mar  2024 copr:copr.fedorainfracloud.org:phracek:PyCharm-09ec371285b96d74
drwxr-xr-x 1 root root       32 30 mar  2024 docker-ce-stable-ce750576fae4671a
drwxr-xr-x 1 root root       32 13 avr  2024 copr:copr.fedorainfracloud.org:chriscowleyunix:better_fonts-febab834135a07fb
drwxr-xr-x 1 root root       32 18 avr  2024 dangerzone-21193819e65fc631
drwxr-xr-x 1 root root       16 24 avr  2024 copr:copr.fedorainfracloud.org:chriscowleyunix:better_fonts-d9fa1403d9d2cc95
drwxr-xr-x 1 root root       16 24 avr  2024 copr:copr.fedorainfracloud.org:elxreno:preload-a2a5c5a55c78dbae
drwxr-xr-x 1 root root       16 24 avr  2024 copr:copr.fedorainfracloud.org:phracek:PyCharm-a5aed6d15393c68f
drwxr-xr-x 1 root root       16 24 avr  2024 copr:copr.fedorainfracloud.org:bgstack15:palemoon-8456785e2406162a
drwxr-xr-x 1 root root      276 11 jui 12:54 ..
drwxr-xr-x 1 root root       32  6 nov 10:19 dangerzone-a5912a6d07f3c6e4
-rw------- 1 root root        0 18 nov 09:56 updates-updateinfo.solvx.DxIy2Z
drwxr-xr-x 1 root root       32 20 nov 16:07 brave-browser-4b8ac32b87fdc4aa
drwxr-xr-x 1 root root       32 21 nov 13:30 vivaldi-457ad8703fcb7021
drwxr-xr-x 1 root root       16 24 nov 16:36 google-chrome-6ed7e4f336f6863c
-rw-r--r-- 1 root root    31026 24 nov 17:55 fastestmirror.cache
drwxr-xr-x 1 root root       30 24 nov 18:01 ookla_speedtest-cli-source-112249cfa02cde1f
drwxr-xr-x 1 root root       30 24 nov 18:01 ookla_speedtest-cli-d08b78ad79e3911d
-rw-r--r-- 1 root root        0 30 nov 11:21 last_makecache
drwxr-xr-x 1 root root       32 30 nov 11:32 updates-b7ba662710b98f1a
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-nonfree-nvidia-driver-d16fec79a9d433a3
drwxr-xr-x 1 root root       16 30 nov 11:32 fedora-cisco-openh264-9aba3e9de3932b1f
drwxr-xr-x 1 root root       32 30 nov 11:32 fedora-376ef8e983c65ce0
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-nonfree-steam-bbd68b1b4b41b102
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-nonfree-updates-c51aede045df9f8d
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-nonfree-0bfae8775a79bfa2
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-free-updates-a0069f946e136662
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-free-933d59a59c90d100
drwxr-xr-x 1 root root       32 30 nov 11:32 fedora-845d89688cb28f31
drwxr-xr-x 1 root root       32 30 nov 11:32 fedora-cisco-openh264-3542736af0455d59
drwxr-xr-x 1 root root       32 30 nov 11:32 updates-7da5a72b0a306ada
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-free-dbf976ff19b604af
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-free-updates-a3d9e063f58c1269
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-nonfree-b12710c2dd9d3ae4
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-nonfree-updates-baf6610f405b0a19
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-nonfree-steam-41ce205f970a18bf
drwxr-xr-x 1 root root       16 30 nov 11:32 rpmfusion-nonfree-nvidia-driver-15f7b76ab818e824
drwxr-xr-x 1 root root       32 30 nov 11:32 fedora-6c3a9e5977a00788
drwxr-xr-x 1 root root       32 30 nov 11:32 fedora-cisco-openh264-3e5cc8d7297aea85
drwxr-xr-x 1 root root       32 30 nov 11:32 updates-02a32a5ce99e20ab
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-free-8434582240c27fd3
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-free-updates-68ab13f22f5389e6
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-nonfree-a320b61b9f10c472
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-nonfree-updates-227aa0e6bfb50fad
drwxr-xr-x 1 root root       32 30 nov 11:32 rpmfusion-nonfree-steam-b13773080cdea806
drwxr-xr-x 1 root root       16 30 nov 11:32 rpmfusion-nonfree-nvidia-driver-3047643ad0750a1c
drwxr-xr-x 1 root root       32 30 nov 11:32 copr:copr.fedorainfracloud.org:kwizart:kernel-longterm-6.6-3183121918c26405
drwxr-xr-x 1 root root       16 30 nov 11:32 repo.vivaldi.com_archive_rpm_x86_64_-8d5821030bddaeb1
-rw-r--r-- 1 root root   793802 30 nov 11:32 copr:copr.fedorainfracloud.org:kwizart:kernel-longterm-6.6.solv
-rw-r--r-- 1 root root     6116 30 nov 11:32 repo.vivaldi.com_archive_rpm_x86_64_.solv
-rw-r--r-- 1 root root 10993664 30 nov 11:32 packages.db
drwxr-xr-x 1 root root        0 30 nov 11:32 mirrors.fedoraproject.org_metalink_repofedora-40-766d09f5659c9152
drwxr-xr-x 1 root root        0 30 nov 11:32 mirrors.fedoraproject.org_metalink_repofedora-cisco-openh264-40-90e7593706820e86
drwxr-xr-x 1 root root        0 30 nov 11:32 mirrors.fedoraproject.org_metalink_repoupdates-released-f40-21d27663db76bb42
drwxr-xr-x 1 root root        0 30 nov 11:32 mirrors.rpmfusion.org_metalink_repononfree-fedora-steam-40-fc2df7e53df8d104
drwxr-xr-x 1 root root        0 30 nov 11:32 mirrors.rpmfusion.org_metalink_repononfree-fedora-updates-released-40-a54c9b8dc20c67b5
drwxr-xr-x 1 root root        0 30 nov 11:46 home_shizuma_Downloads_metalink-7c6a1376daac3eea
drwxr-xr-x 1 root root       16 30 nov 11:49 commandline-de45ba111763b348
-rw-r--r-- 1 root root        2 30 nov 11:50 expired_repos.json

I imagine the data after nov 25 is unreliable though. I issued some non working commands:

 9954  sudo dnf config-manager --add-repo=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-steam-40&arch=x86_64
 9957  sudo dnf config-manager --add-repo=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-steam-40&arch=x86_64
 9958  sudo dnf config-manager --add-repo=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-updates-released-40&arch=x86_64
 9959  sudo dnf config-manager --add-repo=https://repo.vivaldi.com/archive/rpm/x86_64/
 9960  sudo dnf config-manager --add-repo=https://mirrors.fedoraproject.org/metalink?repo=fedora-40&arch=x86_64
 9961  sudo dnf config-manager --add-repo=https://mirrors.fedoraproject.org/metalink?repo=fedora-cisco-openh264-40&arch=x86_64
 9962  sudo dnf config-manager --add-repo=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f40&arch=x86_64
 9963  sudo dnf --refresh upgrade
 9964  dnf repolist
 9965  dnf repolist --all
 9968  sudo dnf config-manager --remove-repo=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-steam-40&arch=x86_64
 9969  dnf config-manager --add-repo nonfree-fedora-steam-40&arch=x86_64
 9970  sudo dnf config-manager --add-repo nonfree-fedora-steam-40&arch=x86_64
 9972  sudo dnf config-manager --add-repo nonfree-fedora-steam-40&arch=x86_64
 9973  dnf repolist
 9974  sudo rm /etc/yum.repos.d/home_shizuma_nonfree-fedora-steam-40.repo 
 9977  sudo dnf update
 9978  sudo rm /etc/yum.repos.d/home_shizuma_Downloads_metalink.repo 
 9980  sudo dnf install https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-40&arch=x86_64
 9984  ll /var/cache/dnf
 9985  sudo dnf reinstall dnfdragora
 9986  ll /etc/yum.repos.d
 9987  sudo rm /etc/yum.repos.d/mirrors.*
 9988  sudo rm /etc/yum.repos.d/repo.vivaldi.com_archive_rpm_x86_64_.repo 
 9989  ll /etc/yum.repos.d
 9990  sudo dnf --refresh upgrade

The crucial part is:

for PKG in fedora-repos rpmfusion-{free,nonfree}-release; \
do sudo rpm -e --nodeps ${PKG}; done
sudo dnf install https://dl.fedoraproject.org/pub/fedora/\
linux/releases/$(rpm -E %{fedora})/Everything/$(arch)/\
os/Packages/f/fedora-repos-$(rpm -E %{fedora})-1.noarch.rpm
sudo dnf reinstall fedora-workstation-repositories

Enabling the RPM Fusion repositories :: Fedora Docs

Other repos should be enabled manually depending on your needs.

1 Like

Thanks a lot. Managed to get most of them back. What a job. Missing steam and nvidia from rpmfusion nonfree though although I do have steam installed.

rpmfusion-nonfree-nvidia-driver                                            RPM Fusion for Fedora 40 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam                                                    RPM Fusion for Fedora 40 - Nonfree - Steam

Actual status:

10000  sudo dnf reinstall https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
10013  sudo dnf copr enable phracek/PyCharm
10014  sudo dnf reinstall fedora-repos fedora-workstation-repositories
10016  sudo dnf copr enable elxreno/preload
10017  sudo dnf copr enable chriscowleyunix/better_fonts
10019  curl https://packages.freedom.press/yum-tools-prod/dangerzone/dangerzone.repo | sudo tee /etc/yum.repos.d/dangerzone.repo
10021  sudo dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
10023  sudo dnf config-manager --add-repo https://repo.vivaldi.com/archive/vivaldi-fedora.repo
10028  sudo dnf copr enable bgstack15/palemoon

$ ll /etc/yum.repos.d/
total 80
drwxr-xr-x 1 root root 1188 30 nov 14:16 .
drwxr-xr-x 1 root root 6356 30 nov 13:46 ..
-rw-r--r-- 1 root root  190 30 nov 14:08 brave-browser.repo
-rw-r--r-- 1 root root  388 30 nov 14:16 _copr:copr.fedorainfracloud.org:bgstack15:palemoon.repo
-rw-r--r-- 1 root root  428 30 nov 14:04 _copr:copr.fedorainfracloud.org:chriscowleyunix:better_fonts.repo
-rw-r--r-- 1 root root  376 30 nov 14:04 _copr:copr.fedorainfracloud.org:elxreno:preload.repo
-rw-r--r-- 1 root root  424 25 nov 09:42 _copr:copr.fedorainfracloud.org:kwizart:kernel-longterm-6.6.repo
-rw-r--r-- 1 root root  376 30 nov 14:03 _copr:copr.fedorainfracloud.org:phracek:PyCharm.repo
-rw-r--r-- 1 root root  253 30 nov 14:07 dangerzone.repo
-rw-r--r-- 1 root root 1102 22 mai  2024 fedora-cisco-openh264.repo
-rw-r--r-- 1 root root 1239 22 mai  2024 fedora.repo
-rw-r--r-- 1 root root 1286 22 mai  2024 fedora-updates.repo
-rw-r--r-- 1 root root 1344 22 mai  2024 fedora-updates-testing.repo
-rw-r--r-- 1 root root 1248 19 avr  2024 rpmfusion-free.repo
-rw-r--r-- 1 root root 1264 19 avr  2024 rpmfusion-free-updates.repo
-rw-r--r-- 1 root root 1324 19 avr  2024 rpmfusion-free-updates-testing.repo
-rw-r--r-- 1 root root 1312 19 avr  2024 rpmfusion-nonfree.repo
-rw-r--r-- 1 root root 1309 19 avr  2024 rpmfusion-nonfree-updates.repo
-rw-r--r-- 1 root root 1369 19 avr  2024 rpmfusion-nonfree-updates-testing.repo
-rw-r--r-- 1 root root  161 30 nov 14:09 vivaldi-fedora.repo

$ sudo dnf --refresh update
Copr repo for palemoon owned by bgstack15                                                                                       9.0 kB/s | 2.9 kB     00:00    
Copr repo for better_fonts owned by chriscowleyunix                                                                              11 kB/s | 1.5 kB     00:00    
Copr repo for preload owned by elxreno                                                                                           15 kB/s | 1.5 kB     00:00    
Copr repo for kernel-longterm-6.6 owned by kwizart                                                                              8.6 kB/s | 1.5 kB     00:00    
Copr repo for PyCharm owned by phracek                                                                                           20 kB/s | 1.8 kB     00:00    
Brave Browser                                                                                                                    19 kB/s | 2.0 kB     00:00    
Dangerzone repository                                                                                                            24 kB/s | 3.0 kB     00:00    
Fedora 40 - x86_64                                                                                                              116 kB/s |  32 kB     00:00    
Fedora 40 openh264 (From Cisco) - x86_64                                                                                        5.5 kB/s | 989  B     00:00    
Fedora 40 - x86_64 - Updates                                                                                                     78 kB/s |  30 kB     00:00    
RPM Fusion for Fedora 40 - Free                                                                                                  10 kB/s | 7.8 kB     00:00    
RPM Fusion for Fedora 40 - Free - Updates                                                                                        87 kB/s | 7.2 kB     00:00    
RPM Fusion for Fedora 40 - Nonfree                                                                                               16 kB/s | 7.9 kB     00:00    
RPM Fusion for Fedora 40 - Nonfree - Updates                                                                                     20 kB/s | 6.3 kB     00:00    
vivaldi                                                                                                                          18 kB/s | 3.0 kB     00:00    

UPDATE

Tried a manual install for steam:

$ cat /etc/yum.repos.d/rpmfusion-nonfree-steam.repo
[rpmfusion-nonfree-steam]
name=RPM Fusion for Fedora $releasever – Nonfree – Steam
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/steam/$releasever/$basearch/
metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-steam-$releasever&arch=$basearch
enabled=1
enabled_metadata=1
type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///usr/share/distribution-gpg-keys/rpmfusion/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever

[rpmfusion-nonfree-steam-debuginfo]
name=RPM Fusion for Fedora $releasever – Nonfree – Steam Debug
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/steam/$releasever/$basearch/debug/
metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-steam-debug-$releasever&arch=$basearch
enabled=0
type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///usr/share/distribution-gpg-keys/rpmfusion/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever

[rpmfusion-nonfree-steam-source]
name=RPM Fusion for Fedora $releasever – Nonfree – Steam Source
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/steam/$releasever/SRPMS/
metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-steam-source-$releasever&arch=$basearch
enabled=0
type=rpm-md
gpgcheck=1
repo_gpgcheck=0
gpgkey=file:///usr/share/distribution-gpg-keys/rpmfusion/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever

sudo dnf reinstall fedora-workstation-repositories

Thanks for your replies. Did that 3 times. Doesn’t work in this particular case (repos directory wiped and 5 days wait). No steam, no nvidia (I don’t care for nvidia). I found the file somewhere though and a manual edit seemed to solve this. Edited my previous post to reflect this just in case someone else wiped his repos list…

What a mess. Found the culprit for the deletion though. It was an ookla speedtest cli install instructions that were out of date.

containing curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.rpm.sh | sudo bash which executes
sudo yum -q makecache -y --disablerepo='*' --enablerepo='ookla_speedtest-cli'