This isn’t an issue with Ubuntu, Mint, Debian, etc, yet affects Arch-based distros because of this reason:
It’s not sleek nor perfect, but works well enough for me.
You install (from the official Arch Community repository; not from the AUR) the package: kernel-modules-hook
Now whenever you update your kernel (even the kernel of the currently live running system), the modules under /usr/lib/modules/ will remain preserved, thanks to the included and auto-enabled pacman “hook”.
It also includes a systemd service (linux-modules-cleanup.service) which will automatically prune old modules on a schedule …
Here’s a highlight from the post:
I have to mention this, even if it’s unpopular: a distro like Ubuntu handles kernel updates properly
It’s a very simple reason really. They treat each minor version of the kernel as its own package. Whereas the major version of a kernel is simply a meta-package that tells the system which kernel “train” to keep updating.
To this day I believe that Arch (and Arch-based distros) would be less of a headache for users, new and established, if they didn’t pull the rug from under our feet every time there’s a minor update to the current major kernel version.
It could be implemented with logic as simple as:
“If there’s an update to the major kernel version of which the user is currently running, treat each minor kernel version as its own package and have in place a ‘pruning’ service that automatically removes older kernels, with the important exception of the currently running kernel .”
Read the entire post and thread for context around the discussion.
Still not sure why Arch Linux does it this way.
The kernel-modules-hook
is a nice effort to buffer this, yet I believe addressing the underlying issue (in regards to kernel updates) is still warranted. (Thus, such a hook wouldn’t even be needed.)