F41 upgrade marks all packages as manually installed

After the upgrade every package in the system is marked as userinstalled, anyone else see the same thing?
This means that when a package is removed, their dependencies will not be automatically removed.

$ dnf repoquery --userinstalled
$ dnf repoquery --installed

Made a report on Bugzilla here.

Actually dependencies are removed as expected. As for why it shows everything as userinstalled, from the Bugzilla ticket:

In Fedora 41 “dnf” command is DNF5, not DNF4.

I suspect that “dnf4 repoquery --userinstalled” will print expected values, while “dnf” will return too many user-installed packages. One reason is that DNF5 reports packages with an unknown reason as “userinstalled”. That’s a feature. You can see that difference if you supply “–queryformat ‘%{name} %{reason}\n’” option to the DNF5 repoquery command.

https://fedoraproject.org/wiki/Changes/SwitchToDnf5#Different_system_state

Though the RPM DB… remains the singular source in the system, the transactional history and installed packages reasons in dnf and dnf5 is not shared, and they now use different formats.
While the history database is not migrated to dnf5, when running a transaction in dnf5 for the first time, an attempt is made to convert and load the existing system state from dnf.

Hmm so that’s why.
After some use, the list has now changed, though I’m seeing some inconsistent result between dnf4 and dnf5 outputs (–userinstalled, reasons) and neither are quite correct.

1 Like

See also:
dnf5 repoquery reports the wrong reason ¡ Issue #1833 ¡ rpm-software-management/dnf5 ¡ GitHub

1 Like

Oh gawd, I just reinstalled my system and I’m seeing this again as well. I thought I saw the correct output before I installed the desktop…

abrt-desktop and abrt-cli (part of @workstation-product) has an implicit dependency on dnf4. Not sure if it’s the cause but I definitely used abrt, and it checked for package update…

$ rpm -qf /usr/bin/dnf4
python3-dnf-4.21.1-2.fc41.noarch
$ dnf repoquery --whatdepends python3-dnf --installed
python3-libreport-0:2.17.15-3.fc41.x86_64
$ dnf repoquery --whatdepends python3-libreport --installed
abrt-addon-ccpp-0:2.17.6-2.fc41.x86_64
gnome-abrt-0:1.4.3-3.fc41.x86_64
libreport-plugin-bugzilla-0:2.17.15-3.fc41.x86_64
python3-abrt-0:2.17.6-2.fc41.x86_64
$ dnf repoquery --whatdepends gnome-abrt --installed
abrt-desktop-0:2.17.6-2.fc41.x86_64
abrt-gui-0:2.17.6-2.fc41.x86_64

Ok so it turns out --installed is needed for some reason.

$ dnf -q rq --qf="%{reason}\n" bash
None
$ dnf -q rq --qf="%{reason}\n" bash --installed
Group
1 Like