It is always installed. It is where the kernel code comes from.
Help says this is a no-op and does nothing.
Sorry, my bad, it’s the other way around. On some virtualised environments you’d have kernel-core installed but not kernel. By default, needs-restarting checks the last time a number of packages were updated, one of those being kernel. The fix for those VMs is to ask it to check kernel-core as well. That means those VMs will then pick up kernel updates as requiring a restart
The kernel package provides no files, but requires the kernel-core, kernel-modules-core and kernel-modules as dependency.
I just had different results trying on my laptop …
It seems to all be tied to sudo
If I run as root sudo su - and then dnf needs-restarting also works.
I guess I just got lucky (?) when I was running it earlier.
Thanks!
Yes, which is why it is arbitrary that dnf needs-restarting only looks to see when the kernel package was last updated, because that is the one that isn’t even installed on a xen / KVM VPS.