Distro-sync problems after upgrading to Fedora 36

I just noticed that my Settings is showing up twice. I would really like to delete all the old duplicate packages, also because I need the disk space. Should I just run sudo dnf remove --duplicates?
What about installing these repos?
sudo dnf install https://kojipkgs.fedoraproject.org//packages/fedora-repos/36/1/noarch/fedora-gpg-keys-36-1.noarch.rpm https://kojipkgs.fedoraproject.org//packages/fedora-repos/36/1/noarch/fedora-repos-36-1.noarch.rpm https://kojipkgs.fedoraproject.org//packages/fedora-repos/36/1/noarch/fedora-repos-modular-36-1.noarch.rpm
I think I still need them, as dnf repolist tells me most are still on 35:

Paketquellenkennung                                                                               Paketquellenname
brave-browser-rpm-release.s3.brave.com_x86_64_                                                    created by dnf config-manager from https://brave-browser-rpm-release.s3.brave.com/x86_64/
copr:copr.fedorainfracloud.org:elxreno:multimc                                                    Copr repo for multimc owned by elxreno
fedora                                                                                            Fedora 35 - x86_64
fedora-cisco-openh264                                                                             Fedora 35 openh264 (From Cisco) - x86_64
fedora-modular                                                                                    Fedora Modular 35 - x86_64
google-chrome                                                                                     google-chrome
phracek-PyCharm                                                                                   Copr repo for PyCharm owned by phracek
rpmfusion-free                                                                                    RPM Fusion for Fedora 35 - Free
rpmfusion-free-updates                                                                            RPM Fusion for Fedora 35 - Free - Updates
rpmfusion-nonfree                                                                                 RPM Fusion for Fedora 35 - Nonfree
rpmfusion-nonfree-nvidia-driver                                                                   RPM Fusion for Fedora 35 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam                                                                           RPM Fusion for Fedora 35 - Nonfree - Steam
rpmfusion-nonfree-updates                                                                         RPM Fusion for Fedora 35 - Nonfree - Updates
updates                                                                                           Fedora 35 - x86_64 - Updates
updates-modular                                                                                   Fedora Modular 35 - x86_64 - Updates

What about sudo dnf distro-sync?

From the man page for grep, grep expects the options before the pattern to look for so I think that would be better done as
dnf list installed | grep -c -v fc35
It does work as you showed it, but may not with all versions of grep.

sudo dnf remove --duplicates will give you a list of packages to remove, and you can say yes or no. You can also pick and choose from that list with a different command.
The same applies to sudo dnf distro-sync.

It is up to the user to fix problems that are reported with any of those commands; whether the command causes it to fail or it tries to do something specific that the user deems it should not.

Dnf, by default, requires the user to tell it yes before it actually does anything but create a list of actions to be taken.

sudo dnf remove --duplicates did not give me the opportunity to remove any packages, nor did sudo dnf distro-sync.
sudo dnf remove --duplicates told me for 1377 packages the following (translated from German): Installed package *.fc36.* not available.. I assume this may be due to my repos still being on 35.
This is the output of sudo dnf distro-sync:

Fehler: 
 Problem 1: package NetworkManager-initscripts-ifcfg-rh-1:1.38.0-2.fc36.x86_64 requires NetworkManager = 1:1.38.0-2.fc36, but none of the providers can be installed
  - NetworkManager-1:1.38.0-2.fc36.x86_64 does not belong to a distupgrade repository
  - Problem mit installiertem Paket NetworkManager-initscripts-ifcfg-rh-1:1.38.0-2.fc36.x86_64
 Problem 2: package gnome-desktop4-42.3-1.fc36.x86_64 requires gnome-desktop3(x86-64) = 42.3-1.fc36, but none of the providers can be installed
  - gnome-desktop3-42.3-1.fc36.x86_64 does not belong to a distupgrade repository
  - Problem mit installiertem Paket gnome-desktop4-42.3-1.fc36.x86_64
 Problem 3: package httpd-core-2.4.54-3.fc36.x86_64 requires httpd-filesystem = 2.4.54-3.fc36, but none of the providers can be installed
  - httpd-filesystem-2.4.54-3.fc36.noarch does not belong to a distupgrade repository
  - Problem mit installiertem Paket httpd-core-2.4.54-3.fc36.x86_64
 Problem 4: package libnma-gtk4-1.8.38-1.fc36.x86_64 requires gtk4(x86-64) >= 4.6.2, but none of the providers can be installed
  - gtk4-4.6.6-1.fc36.x86_64 does not belong to a distupgrade repository
  - Problem mit installiertem Paket libnma-gtk4-1.8.38-1.fc36.x86_64
 Problem 5: package python3-gobject-base-noarch-3.42.1-1.fc36.noarch requires python3-gobject-base = 3.42.1-1.fc36, but none of the providers can be installed
  - python3-gobject-base-3.42.1-1.fc36.x86_64 does not belong to a distupgrade repository
  - Problem mit installiertem Paket python3-gobject-base-noarch-3.42.1-1.fc36.noarch
 Problem 6: package unbound-anchor-1.16.0-5.fc36.x86_64 requires libcrypto.so.3()(64bit), but none of the providers can be installed
  - package unbound-anchor-1.16.0-5.fc36.x86_64 requires libcrypto.so.3(OPENSSL_3.0.0)(64bit), but none of the providers can be installed
  - package unbound-anchor-1.16.0-5.fc36.x86_64 requires libssl.so.3()(64bit), but none of the providers can be installed
  - package unbound-anchor-1.16.0-5.fc36.x86_64 requires libssl.so.3(OPENSSL_3.0.0)(64bit), but none of the providers can be installed
  - openssl-libs-1:3.0.5-1.fc36.x86_64 does not belong to a distupgrade repository
  - Problem mit installiertem Paket unbound-anchor-1.16.0-5.fc36.x86_64
(try to add '--skip-broken' to skip uninstallable packages)

I also ran dnf check and it discovered 1406 problems, 1377 of which are duplicates (note that this is the same number of packages that are not available when running sudo dnf remove --duplicates) of 35 and 36.

Sorry if I repeat.
In practice you have the F35 repositories in place on a F36 system.
IMHO, dnf could not work

Which version of fedora-release package is installed?
I suppose fedora-release-36-*, but can you post the result of this command?
rpm -qa | grep fedora-release

rpm -qa | grep fedora-release:

fedora-release-identity-workstation-35-36.noarch
fedora-release-workstation-35-36.noarch
fedora-release-identity-workstation-36-18.noarch
fedora-release-workstation-36-18.noarch
fedora-release-common-36-18.noarch

both, actually…

Sorry if I repeat.
In practice you have the F35 repositories in place on a F36 system.
IMHO, dnf could not work

No problem, I realise you told me about the repos that I might be missing, and how to install them; I was just awaiting your reassurance to do it after you asked me to run informative commands and I told you the results. So, should I run this now?
sudo dnf install https://kojipkgs.fedoraproject.org//packages/fedora-repos/36/1/noarch/fedora-gpg-keys-36-1.noarch.rpm https://kojipkgs.fedoraproject.org//packages/fedora-repos/36/1/noarch/fedora-repos-36-1.noarch.rpm https://kojipkgs.fedoraproject.org//packages/fedora-repos/36/1/noarch/fedora-repos-modular-36-1.noarch.rpm

I wpuld try. Maybe dnf will complain about some missing dependencies or the like. Let’s see how it goes.

Schnellster Mirror wird ermittelt (78 Hosts).. done.                                                    [===                                                                                                ] ---  B/s |   0  B     --:-- ETA
Fedora 35 - x86_64 - Updates                                                                                                                                                                                  8.5 kB/s |  16 kB     00:01    
done.a 35 - x86_64 - Updates                                                                            [===                                                                                                ] ---  B/s |   0  B     --:-- ETA
Fedora 35 - x86_64 - Updates                                                                                                                                                                                  1.2 MB/s | 3.0 MB     00:02    
Schnellster Mirror wird ermittelt (23 Hosts).. done.                                                    [      ===                                                                                          ] ---  B/s |   0  B     --:-- ETA
Fedora Modular 35 - x86_64 - Updates                                                                                                                                                                           26 kB/s |  19 kB     00:00    
fedora-gpg-keys-36-1.noarch.rpm                                                                                                                                                                               118 kB/s | 114 kB     00:00    
fedora-repos-36-1.noarch.rpm                                                                                                                                                                                   17 kB/s |  10 kB     00:00    
fedora-repos-modular-36-1.noarch.rpm                                                                                                                                                                           18 kB/s |  10 kB     00:00    
Das Paket fedora-gpg-keys-36-1.noarch ist bereits installiert. (The package * is already installed.)
Das Paket fedora-repos-36-1.noarch ist bereits installiert.
Das Paket fedora-repos-modular-36-1.noarch ist bereits installiert.
Abhängigkeiten sind aufgelöst. (Dependencies are resolved.)
Nichts zu tun. (Nothing to do.)
Fertig! (Done!)

GUI told me there are updates available soon after running the command, not sure if that’s causally connected.

When I ran sudo dnf remove --duplicates again (output unchanged), I noticed this bit at the end:

Fehler:  (Error:)
 Problem: Die Operation würde dazu führen, dass die folgenden geschützten Pakete entfernt werden: NetworkManager, dnf, gnome-shell, grub2-tools-minimal, systemd, systemd-udev
(Problem: This operation would lead to the following protected packages being removed:)

Could you paste the result of this command?
rpm -qa | grep fedora-repos

fedora-repos-35-1.noarch
fedora-repos-modular-35-1.noarch
fedora-repos-36-1.noarch
fedora-repos-modular-36-1.noarch

Ok, sorry: wrong direction.

I was looking what fedora-repos packages will install, and I don’t see nothing related to the release.
The point is $releasever (as stated before by @computersavvy) contained in the repository definition files. There is something “telling” dnf that you are still on 35.

uname -r still tells me 5.18.13-100.fc35.x86_64. This might be the problem?

What does cat /usr/lib/os-release tell you?

You already told us that cat /etc/redhat-release showed fedora 36. and this is the only other file that might be related. (see my post #19 above)

NAME="Fedora Linux"
VERSION="36 (Workstation Edition)"
ID=fedora
VERSION_ID=36
VERSION_CODENAME=""
PLATFORM_ID="platform:f36"
PRETTY_NAME="Fedora Linux 36 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"
SUPPORT_URL="https://discussion.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=36
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=36
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation

It’s shouting 36 at me, good.

That then seems to be good, but as @alciregi said, the repos did not get updated.

I believe you should follow his suggestion (which you quoted in post 26) to upgrade the fedora repos so you can sync with the f36 repo and things should all be better.

It seems dnf is not able to access the proper repo.

I already ran the repo install command, and I posted the output in #28, but dnf repolist still tells me my repos are on 35:

Paketquellenkennung                                                                               Paketquellenname
brave-browser-rpm-release.s3.brave.com_x86_64_                                                    created by dnf config-manager from https://brave-browser-rpm-release.s3.brave.com/x86_64/
copr:copr.fedorainfracloud.org:elxreno:multimc                                                    Copr repo for multimc owned by elxreno
fedora                                                                                            Fedora 35 - x86_64
fedora-cisco-openh264                                                                             Fedora 35 openh264 (From Cisco) - x86_64
fedora-modular                                                                                    Fedora Modular 35 - x86_64
google-chrome                                                                                     google-chrome
phracek-PyCharm                                                                                   Copr repo for PyCharm owned by phracek
rpmfusion-free                                                                                    RPM Fusion for Fedora 35 - Free
rpmfusion-free-updates                                                                            RPM Fusion for Fedora 35 - Free - Updates
rpmfusion-nonfree                                                                                 RPM Fusion for Fedora 35 - Nonfree
rpmfusion-nonfree-nvidia-driver                                                                   RPM Fusion for Fedora 35 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam                                                                           RPM Fusion for Fedora 35 - Nonfree - Steam
rpmfusion-nonfree-updates                                                                         RPM Fusion for Fedora 35 - Nonfree - Updates
updates                                                                                           Fedora 35 - x86_64 - Updates
updates-modular                                                                                   Fedora Modular 35 - x86_64 - Updates

I did not notice the behaviour of any other commands changing either.

You could edit 2 of the repo files and force it to look only at the fedora 36 repos for purposes of getting things back in sync.
Doing that would require editing /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo

To force dnf to look only at the F36 repo these files would need edited as below

[fedora]
name=Fedora $releasever - $basearch
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
countme=1
deltarpms=0
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

Above is the original text on my system for the fedora.repo file. The one for fedora-updates.repo is similar.
You could edit the lines that begin with metalink and gpgkey by replacing $releasever with 36 which then would force dnf to only look at the fedora 36 repos.

Once you have things back in sync that change should be reversed so updates are done normally.

If you have things installed from the fedora-modular repo then you likely should also edit the fedora-modular.repo and fedora-updates-modular.repo similarly.

Making the suggested edits will force dnf to look only at the fedora 36 repos and should enable a proper distro-sync.

1 Like

@computersavvy I wonder if adding --releasever=36 to dnf distrosync could work :thinking:

--releasever=<release>
    Configure DNF as if the distribution
    release was <release>. 
    This can affect cache paths, values in
    configuration files and mirrorlist URLs.

Worth trying, but I have no experience there.

I ran it as soon as your suggestion popped up. It actually did something!

Copr repo for multimc owned by elxreno                                                 14 kB/s |  10 kB     00:00    
Copr repo for PyCharm owned by phracek                                                 39 kB/s |  43 kB     00:01    
Fedora 36 - x86_64                                                                    6.3 MB/s |  81 MB     00:12    
Fedora 36 openh264 (From Cisco) - x86_64                                              6.8 kB/s | 2.5 kB     00:00    
Fedora Modular 36 - x86_64                                                            1.6 MB/s | 2.4 MB     00:01    
Fedora 36 - x86_64 - Updates                                                          6.0 MB/s |  24 MB     00:03    
Fedora Modular 36 - x86_64 - Updates                                                  2.6 MB/s | 2.2 MB     00:00    
RPM Fusion for Fedora 36 - Free                                                       1.1 MB/s | 676 kB     00:00    
RPM Fusion for Fedora 36 - Free - Updates                                             490 kB/s | 254 kB     00:00    
RPM Fusion for Fedora 36 - Nonfree                                                    481 kB/s | 252 kB     00:00    
RPM Fusion for Fedora 36 - Nonfree - NVIDIA Driver                                     31 kB/s |  15 kB     00:00    
RPM Fusion for Fedora 36 - Nonfree - Steam                                            4.5 kB/s | 2.1 kB     00:00    
RPM Fusion for Fedora 36 - Nonfree - Updates                                          143 kB/s |  84 kB     00:00    
Fehler: 
 Problem: Die Operation würde dazu führen, dass die folgenden geschützten Pakete entfernt werden: dnf, gnome-shell, grub2-tools-minimal, systemd, systemd-udev
(try to add '--skip-broken' to skip uninstallable packages)

However, dnf repolist still shows 35 for the repos.