Description of problem: PackageKit 1.2.5 was released yesterday (and is already in Rawhide) and finally adds support for autoremove flag when removing packages (see first link in Additional info). It should work in gnome-software after enabling "packagekit_autoremove" meson build option (see second link in Additional info). Please, consider enabling this build option on Fedora (Rawhide for now). It should hopefully be safe, however some testing would probably be needed to make sure it works properly and does not end up breaking user's system. Basically, it should work the same as when running "dnf remove <package>" - dependencies related to the package that are not needed anymore are removed. Additional info: https://github.com/PackageKit/PackageKit/commit/3d6d285c626e6941581c7bee337a012428c943df#diff-7ee66c4f1536ac84dc5bbff1b8312e2eef24b974b3e48a5c5c2bcfdf2eb8f3ceR40 https://gitlab.gnome.org/GNOME/gnome-software/-/blob/main/meson_options.txt#L5
Thanks for a bug report. Okay, I can enable the build option. There's no way for the user to change the behavior, in contrast to the DNF, but let's see whether it'll cause any trouble.
I have just tested this on a clean, latest Rawhide installation and it seems to work fine. Uninstalling a package using Software correctly resulted in its unneeded dependencies also being removed and there was no system breakage or other bad things. :-) For example, here is a log from removing gnome-boxes using Software: úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package gnome-boxes;42~alpha-2.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-gobject;4.0.0-4.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-kvm;8.0.0-2.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-driver-storage;8.0.0-2.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-driver-qemu;8.0.0-2.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-driver-network;8.0.0-2.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-driver-nodedev;8.0.0-2.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-daemon-driver-interface;8.0.0-2.fc36;x86_64;installed was removing for uid 1000 <full log truncated> úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package mdevctl;1.1.0-3.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package dnsmasq;2.86-5.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package lzop;1.04-8.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package systemd-container;250.3-4.fc37;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package libvirt-gconfig;4.0.0-4.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: in /59_dabcbade for remove-packages package gvncpulse;1.3.0-2.fc36;x86_64;installed was removing for uid 1000 úno 24 15:11:51 fedora PackageKit[1172]: remove-packages transaction /59_dabcbade from uid 1000 finished with success after 20469ms
I found out that the `-Dpackagekit_autoremove=true` flag is missing in gnome-software.spec from the Fedora 36 branch. Will this fix be backported?
I may be wrong, but I think that the plan was to enable it in Rawhide/Fedora 37 since it got enabled when F36 was already branched. :-)
Correct, it was "safer" to do it only in the rawhide, thus f37 at that time, also because it was not clear when/whether the PackageKit will be updated in the f36, because the option makes sense only with a patched PackageKit.
PackageKit-1.2.5-1.fc36.x86_64 is currently installed here in F36 and the autoremove support was introduced in 1.2.4: https://github.com/PackageKit/PackageKit/commit/3d6d285c626e6941581c7bee337a012428c943df#diff-7ee66c4f1536ac84dc5bbff1b8312e2eef24b974b3e48a5c5c2bcfdf2eb8f3ceR40
Correction: was introduced in 1.2.5, so the proper version of PackageKit is already available in the F36 branch.
https://src.fedoraproject.org/rpms/PackageKit
Okay, I do not mind that much, it can be reverted if needed. I prepared the change locally. Unless anything bad happens it'll be included together with the next upstream release/update in f36.
FEDORA-2022-b5b948abe2 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b5b948abe2
FEDORA-2022-b5b948abe2 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-b5b948abe2` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-b5b948abe2 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-b5b948abe2 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.