Hide Forgot
Description of problem: yum has a undocumented autoremove feature that functions similar to apt-get autoremove which removes any package that has been installed only as a dependency (yumdb stores that info) and of course, I would prefer if dnf actually documents the option when it is added :-) references https://bugzilla.redhat.com/show_bug.cgi?id=951839 http://blog.thefinalzone.net/2013/04/yum-autoremove.html same output: sudo yum autoremove [sudo] password for rahul: Loaded plugins: langpacks, presto, refresh-packagekit Resolving Dependencies --> Running transaction check ---> Package eekboard-service.x86_64 0:1.0.8-2.fc18 will be erased ---> Package gnome-dvb-daemon.x86_64 0:0.2.10-1.fc18 will be erased ---> Package gtkhtml3.x86_64 0:4.6.4-1.fc18 will be erased ---> Package hesiod.x86_64 0:3.1.0-22.fc18 will be erased ---> Package iok.x86_64 0:2.1.3-2.fc18 will be erased ---> Package libGLEW.x86_64 0:1.7.0-3.fc18 will be erased ---> Package libchamplain-gtk.x86_64 0:0.12.3-3.fc18 will be erased ---> Package libytnef.x86_64 0:1.5-9.fc18 will be erased ---> Package pkcs11-helper.x86_64 0:1.09-3.fc18 will be erased ---> Package procmail.x86_64 0:3.22-31.fc18 will be erased ---> Package telepathy-farstream.x86_64 0:0.6.0-1.fc18 will be erased ---> Package telepathy-gabble.x86_64 0:0.16.5-1.fc18 will be erased ---> Package telepathy-salut.x86_64 0:0.8.1-1.fc18 will be erased --> Finished Dependency Resolution --> Finding unneeded leftover dependencies ---> Marking farstream02 to be removed - no longer needed by telepathy-farstream ---> Marking eekboard-libs to be removed - no longer needed by eekboard-service ---> Marking telepathy-mission-control to be removed - no longer needed by telepathy-gabble ---> Marking libchamplain to be removed - no longer needed by libchamplain-gtk ---> Marking unique3 to be removed - no longer needed by iok ---> Marking gstreamer-rtsp to be removed - no longer needed by gnome-dvb-daemon Found and removing 6 unneeded dependencies --> Running transaction check ---> Package eekboard-libs.x86_64 0:1.0.8-2.fc18 will be erased ---> Package farstream02.x86_64 0:0.2.2-2.fc18 will be erased ---> Package gstreamer-rtsp.x86_64 0:0.10.8-3.fc18 will be erased ---> Package libchamplain.x86_64 0:0.12.3-3.fc18 will be erased ---> Package telepathy-mission-control.x86_64 1:5.14.0-2.fc18 will be erased ---> Package unique3.x86_64 0:3.0.2-4.fc18 will be erased --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Removing: eekboard-service x86_64 1.0.8-2.fc18 @koji-override-0/$releasever 241 k gnome-dvb-daemon x86_64 0.2.10-1.fc18 @koji-override-0/$releasever 1.7 M gtkhtml3 x86_64 4.6.4-1.fc18 @updates 3.1 M hesiod x86_64 3.1.0-22.fc18 @koji-override-0/$releasever 25 k iok x86_64 2.1.3-2.fc18 @koji-override-0/$releasever 391 k libGLEW x86_64 1.7.0-3.fc18 @koji-override-0/$releasever 499 k libchamplain-gtk x86_64 0.12.3-3.fc18 @koji-override-0/$releasever 17 k libytnef x86_64 1.5-9.fc18 @koji-override-0/$releasever 105 k pkcs11-helper x86_64 1.09-3.fc18 @koji-override-0/$releasever 129 k procmail x86_64 3.22-31.fc18 @koji-override-0/$releasever 353 k telepathy-farstream x86_64 0.6.0-1.fc18 @koji-override-0/$releasever 198 k telepathy-gabble x86_64 0.16.5-1.fc18 @updates 1.9 M telepathy-salut x86_64 0.8.1-1.fc18 @koji-override-0/$releasever 1.1 M Removing for dependencies: eekboard-libs x86_64 1.0.8-2.fc18 @koji-override-0/$releasever 443 k farstream02 x86_64 0.2.2-2.fc18 @updates 680 k gstreamer-rtsp x86_64 0.10.8-3.fc18 @koji-override-0/$releasever 178 k libchamplain x86_64 0.12.3-3.fc18 @koji-override-0/$releasever 747 k telepathy-mission-control x86_64 1:5.14.0-2.fc18 @updates 892 k unique3 x86_64 3.0.2-4.fc18 @koji-override-0/$releasever 169 k Transaction Summary ================================================================================ Remove 13 Packages (+6 Dependent packages) Installed size: 13 M Is this ok [y/N]:
'autoremove' in yum works by looking at the leaf rpmdb packages and intersecting this set with packages marked in yumdb with reason 'dep'. DNF keeps the same information for packages installed through DNF). Note however that DNF by itself will not leave any leaf packages behind as long as the clean_requirements_on_remove config option is True. Giving this low priority.
(FYI: libsolv has a solver_get_unneeded() function that returns a set of "unneeded" packages)
(In reply to Michael Schröder from comment #2) > (FYI: libsolv has a solver_get_unneeded() function that returns a set of > "unneeded" packages) sweet!!
I have problem with actual upgrade. My question is if this enhancement can resolve it or I need create new bug report. DNF update fails because it doesn't do automatic remove of obsolete package # dnf update Resolving dependencies --> Starting dependency resolution --> Finished dependency resolution Error: package kmod-nvidia-3.11.10-301.fc20.x86_64-1:331.20-10.fc20.x86_64 requires kernel-uname-r = 3.11.10-301.fc20.x86_64, but none of the providers can be installed but YUM can make it: # yum update .... Installing for dependencies: kmod-nvidia-3.12.7-300.fc20.x86_64 x86_64 1:331.20-10.fc20.3 rpmfusion-nonfree-updates Removing for dependencies: kmod-nvidia-3.11.10-301.fc20.x86_64 x86_64 1:331.20-10.fc20 @rpmfusion-nonfree 14 M Transaction Summary ============================================================================= Install 3 Packages (+1 Dependent package) Upgrade 60 Packages Remove 3 Packages (+1 Dependent package) Total size: 215 M Total download size: 149 M Is this ok [y/d/N]: dnf doesn't know that it can / has to remove obsolete package kmod-nvidia-3.11.10-301.fc20.x86_64
This more likely seems like the well documented issue with updates: http://dnf.baseurl.org/2014/01/02/dnf-update-and-yum-update-produce-different-output/ Have you synced your metadata?
I did this: dnf clean all dnf update with the same result I don't thik this is problem with obsolete metadata. Explanation: dnf is trying to remove old kernel but forgets to remove old kmod-nvidia-3.11.10-301.fc20.x86_64 DNF output: ----------- dnf list kernel Installed Packages kernel.x86_64 3.11.10-301.fc20 @System kernel.x86_64 3.12.5-302.fc20 @System kernel.x86_64 3.12.6-300.fc20 @System Available Packages kernel.x86_64 3.12.7-300.fc20 updates dnf list kmod-nvidia Installed Packages kmod-nvidia.x86_64 1:331.20-10.fc20.2 @System Available Packages kmod-nvidia.x86_64 1:331.20-10.fc20.3 rpmfusion-nonfree-updates YUN output: ----------- yum list kernel Loaded plugins: langpacks, refresh-packagekit Installed Packages kernel.x86_64 3.11.10-301.fc20 @fedora kernel.x86_64 3.12.5-302.fc20 @updates kernel.x86_64 3.12.6-300.fc20 installed Available Packages kernel.x86_64 3.12.7-300.fc20 updates yum list kmod-nvidia Loaded plugins: langpacks, refresh-packagekit Installed Packages kmod-nvidia.x86_64 1:331.20-10.fc20.2 installed Available Packages kmod-nvidia.x86_64 1:331.20-10.fc20.3 rpmfusion-nonfree-updates
Pavel, you are being hit by bug 1033881. Not related to autoremove.
Thanks for info
Implemented upstream with 8cfef27.
In the end this is not a plugin (it handles the Goal object in a special way that is currently not possible through the exposed API)
dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/libsolv-0.6.1-1.git6d968f1.fc20,hawkey-0.4.16-1.fc20,dnf-0.5.2-1.fc20,dnf-plugins-core-0.0.8-2.fc20
Package dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.0.8-2.fc20 libsolv-0.6.1-1.git6d968f1.fc20 hawkey-0.4.16-1.fc20 dnf-0.5.2-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-6789/libsolv-0.6.1-1.git6d968f1.fc20,hawkey-0.4.16-1.fc20,dnf-0.5.2-1.fc20,dnf-plugins-core-0.0.8-2.fc20 then log in and leave karma (feedback).
dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.