Created attachment 1077953 [details] Output dnf autoremove Description of problem: When executing `dnf autoremove`, dnf intends to remove the following packages: alacarte noarch 3.11.91-2.fc21 @System 369 k audacious-plugins-jack x86_64 3.6.2-1.fc22 @System 20 k dnf-plugin-system-upgrade noarch 0.4.1-1.fc22 @System 78 k kernel x86_64 4.1.6-201.fc22 @System 0 kernel-core x86_64 4.1.6-201.fc22 @System 42 M kernel-devel x86_64 4.1.6-201.fc22 @System 36 M kernel-devel x86_64 4.1.7-200.fc22 @System 36 M kernel-modules x86_64 4.1.6-201.fc22 @System 17 M kernel-modules-extra x86_64 4.1.6-201.fc22 @System 2.1 M libipa_hbac x86_64 1.13.0-4.fc22 @System 53 k libsss_idmap x86_64 1.13.0-4.fc22 @System 65 k libsss_nss_idmap x86_64 1.13.0-4.fc22 @System 61 k python2-dnf-plugin-system-upgrade noarch 0.4.1-1.fc22 @System 52 k python3-sssdconfig noarch 1.13.0-4.fc22 @System 214 k sssd x86_64 1.13.0-4.fc22 @System 34 k sssd-ad x86_64 1.13.0-4.fc22 @System 482 k sssd-client x86_64 1.13.0-4.fc22 @System 206 k sssd-common x86_64 1.13.0-4.fc22 @System 3.1 M sssd-common-pac x86_64 1.13.0-4.fc22 @System 151 k sssd-ipa x86_64 1.13.0-4.fc22 @System 483 k sssd-krb5 x86_64 1.13.0-4.fc22 @System 76 k sssd-krb5-common x86_64 1.13.0-4.fc22 @System 224 k sssd-ldap x86_64 1.13.0-4.fc22 @System 149 k sssd-proxy x86_64 1.13.0-4.fc22 @System 129 k strace x86_64 4.10-2.fc22 @System 1.2 M None of these packages should be removed. Kernel the least. Among this list there are packages such as strace and alacarte that I installed using dnf install, even though dnf history userinstalled doesn't show it. Here is the output of dnf history userinstalled Packages installed by user kernel kernel-core kernel-modules kernel-modules-extra pithos rpmconf I don't understand why kernel* is listed here... Version-Release number of selected component (if applicable): dnf 1.1.1-2.fc22 How reproducible: 100% on my system. Steps to Reproduce: 1. dnf autoremove 2. 3. Actual results: Expected results: Not to remove kernel, and none of the packages that I installed using dnf install ..., and not sssd*. Additional info:
Created attachment 1077957 [details] dnf history userinstalled
.
Please did you upgraded from dnf 0.6 or it is from Fedora 22 installation? Please could you provide log from 'rpm -q kernel*' and 'dnf history userinstalled' ? You can fix it by your self with command 'dnf mark kernel*'
@Jaroslav Mracek: -dnf is the package that is shipped with Fedora 22 (no manual upgrade to newer version or so). -'dnf history userinstalled' is attached above in "Comment 1". I am not sure the content of this file is correct. It has entries like "kernel" and "kernel-core" and I am missing other packages that I really installed manually. -'sudo rpm -q kernel*' outputs the following "package kernel* is not installed" -'sudo rpm -q kernel' outputs the following "kernel-4.1.7-200.fc22.x86_64 kernel-4.1.8-200.fc22.x86_64 kernel-4.1.10-200.fc22.x86_64" Hope that helps.
@Jaroslav Mracek: Regarding the suggested fix: Do you mean marking the package as userinstalled ('dnf mark install kernel*') or unmark it as user-installed ('dnf mark remove kernel*')?
After unmarking "kernel-*" as user-installed ('dnf mark remove kernel-*'), none of the kernel packages should be removed when running 'dnf autoremove' however kernel is listed there with a package size of 0. What about the other packages that dnf wants to remove (esp. sssd*)? Output 'dnf mark remove kernel-*': kernel-4.1.7-200.fc22.x86_64 unmarked as user installed. kernel-4.1.8-200.fc22.x86_64 unmarked as user installed. kernel-4.1.10-200.fc22.x86_64 unmarked as user installed. kernel-core-4.1.7-200.fc22.x86_64 unmarked as user installed. kernel-core-4.1.8-200.fc22.x86_64 unmarked as user installed. kernel-core-4.1.10-200.fc22.x86_64 unmarked as user installed. kernel-devel-4.1.7-200.fc22.x86_64 unmarked as user installed. kernel-devel-4.1.8-200.fc22.x86_64 unmarked as user installed. kernel-devel-4.1.10-200.fc22.x86_64 unmarked as user installed. kernel-headers-4.1.10-200.fc22.x86_64 unmarked as user installed. kernel-modules-4.1.7-200.fc22.x86_64 unmarked as user installed. kernel-modules-4.1.8-200.fc22.x86_64 unmarked as user installed. kernel-modules-4.1.10-200.fc22.x86_64 unmarked as user installed. kernel-modules-extra-4.1.7-200.fc22.x86_64 unmarked as user installed. kernel-modules-extra-4.1.8-200.fc22.x86_64 unmarked as user installed. kernel-modules-extra-4.1.10-200.fc22.x86_64 unmarked as user installed. kernel-tools-4.1.10-200.fc22.x86_64 unmarked as user installed. kernel-tools-libs-4.1.10-200.fc22.x86_64 unmarked as user installed. Output 'dnf autoremove': ================================================================================ Package Arch Version Repository Size ================================================================================ Removing: alacarte noarch 3.11.91-2.fc21 @fedora 369 k audacious-plugins-jack x86_64 3.6.2-1.fc22 @updates 20 k dnf-plugin-system-upgrade noarch 0.4.1-1.fc22 @updates 78 k kernel x86_64 4.1.10-200.fc22 @updates 0 kernel x86_64 4.1.7-200.fc22 @updates 0 kernel x86_64 4.1.8-200.fc22 @updates 0 libipa_hbac x86_64 1.13.0-4.fc22 @updates 53 k libsss_idmap x86_64 1.13.0-4.fc22 @updates 65 k libsss_nss_idmap x86_64 1.13.0-4.fc22 @updates 61 k python2-dnf-plugin-system-upgrade noarch 0.4.1-1.fc22 @updates 52 k python3-sssdconfig noarch 1.13.0-4.fc22 @updates 214 k sssd x86_64 1.13.0-4.fc22 @updates 34 k sssd-ad x86_64 1.13.0-4.fc22 @updates 482 k sssd-client x86_64 1.13.0-4.fc22 @updates 206 k sssd-common x86_64 1.13.0-4.fc22 @updates 3.1 M sssd-common-pac x86_64 1.13.0-4.fc22 @updates 151 k sssd-ipa x86_64 1.13.0-4.fc22 @updates 483 k sssd-krb5 x86_64 1.13.0-4.fc22 @updates 76 k sssd-krb5-common x86_64 1.13.0-4.fc22 @updates 224 k sssd-ldap x86_64 1.13.0-4.fc22 @updates 149 k sssd-proxy x86_64 1.13.0-4.fc22 @updates 129 k Transaction Summary ================================================================================ Remove 21 Packages Installed size: 5.9 M
Please try 'dnf mark install kernel*'. If packages are mark as userinstalled they will be not removed by autoremove command.
After doing that, DNF doesn't want to remove any kernel package anymore when executing 'dnf autoremove'. That workaround works even though I don't like it. Any idea why dnf wants to the other packages listed above in "Comment 6"? Thanks for your support!!
This problem (incorrect package label) was reported for some older versions of dnf and it was fixed. Unfortunately, after install of newer dnf version, the labels remain.
Does that mean that label all packages that DNF wants to autremove should be labeled user-installed manually?
Auto Remove Command dnf [options] autoremove Removes all “leaf” packages from the system that were originally installed as dependencies of user-installed packages but which are no longer required by any such package. Packages listed in installonlypkgs are never automatically removed by this command (kernel ...).
I know, and that's why I think it is a bug if I have to manually mark kernel packages as userinstalled to prevent DNF from removing them. (Actually not only kernel packages, the others that DNF want to remove are in fact userinstalled using dnf....)