Thanks for your bug report. This is a problem that happens when you run a dist-upgrade without upgrade first as the solver tries to aggressively de-prioritize obsolete packages, and if you are only left with an obsolete kernel version it will try to install a random one.
Since kernels are renamed they will always be obsolete each time a new version appears in the archive - there is no special casing for versioned package. I believe the right solution is to add the Recommends to the unversioned metapackage so the solver sees a non-obsolete package with the Provides. We can potentially also include the kernel autoremoval helper in the check to special case old kernel versions as non-obsolete if they are kept by the kernel logic, but I suspect it's a faster and less special fix to just make the metapackages provide the same stuff as the versioned packages. ** Package changed: virtualbox (Ubuntu) => linux (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2169247 Title: virtualbox-7.2 Recommends: linux-image causes APT to install arbitrary cloud kernel flavours To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2169247/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
