New issue by joshuakraemer on void-packages repository https://github.com/void-linux/void-packages/issues/48511 Description: ### Is this a new report? Yes ### System Info Void 6.5.5_2 x86_64 GenuineIntel uptodate rrrrmmnFFFFFFFFFFFFF ### Package(s) Affected xbps-0.59.2_2 ### Does a report exist for this bug with the project's home (upstream) and/or another distro? _No response_ ### Expected behaviour Before each system update, I check for installed kernels with `xbps-query --regex -s '^linux[0-9.]+-[0-9._]+'`, remove old kernel packages with `xbps-remove -Rf linuxX.X` and remove old kernels with `vkpurge rm all`. I expect all old kernels to be removed completely by those commands, including the corresponding header packages. ### Actual behaviour Despite the procedure described above, old kernels don't seem to be removed properly. After an update carried out today, there are still multiple old header packages installed: ``` % xbps-query --regex -s '^linux[0-9]' [*] linux6.0-headers-6.0.19_1 Linux kernel and modules (6.0 series) - source headers for 3rd party modules [*] linux6.1-headers-6.1.71_1 Linux kernel and modules (6.1 series) - source headers for 3rd party modules [*] linux6.3-headers-6.3.13_2 Linux kernel and modules (6.3 series) - source headers for 3rd party modules [*] linux6.5-6.5.13_1 Linux kernel and modules (6.5 series) [*] linux6.5-headers-6.5.13_1 Linux kernel and modules (6.5 series) - source headers for 3rd party modules [*] linux6.6-6.6.11_1 Linux kernel and modules (6.6 series) [*] linux6.6-headers-6.6.11_1 Linux kernel and modules (6.6 series) - source headers for 3rd party modules ``` During the update, DKMS modules for 9 kernels have been built (those even include kernel versions for which no headers are installed): ``` nvidia-dkms-535.154.05_1: configuring ... Added DKMS module 'nvidia-535.154.05'. Skipping kernel-5.13.19_1. kernel-headers package not installed... Building DKMS module 'nvidia-535.154.05' for kernel-5.15.60_1... done. Installing DKMS module 'nvidia-535.154.05' for kernel-5.15.60_1... done. Skipping kernel-5.19.17_1. kernel-headers package not installed... Building DKMS module 'nvidia-535.154.05' for kernel-6.0.19_1... done. Installing DKMS module 'nvidia-535.154.05' for kernel-6.0.19_1... done. Building DKMS module 'nvidia-535.154.05' for kernel-6.1.46_1... done. Installing DKMS module 'nvidia-535.154.05' for kernel-6.1.46_1... done. Building DKMS module 'nvidia-535.154.05' for kernel-6.1.55_2... done. Installing DKMS module 'nvidia-535.154.05' for kernel-6.1.55_2... done. Building DKMS module 'nvidia-535.154.05' for kernel-6.1.71_1... done. Installing DKMS module 'nvidia-535.154.05' for kernel-6.1.71_1... done. Building DKMS module 'nvidia-535.154.05' for kernel-6.3.13_2... done. Installing DKMS module 'nvidia-535.154.05' for kernel-6.3.13_2... done. Building DKMS module 'nvidia-535.154.05' for kernel-6.5.13_1... done. Installing DKMS module 'nvidia-535.154.05' for kernel-6.5.13_1... done. Building DKMS module 'nvidia-535.154.05' for kernel-6.5.5_2... done. Installing DKMS module 'nvidia-535.154.05' for kernel-6.5.5_2... done. Building DKMS module 'nvidia-535.154.05' for kernel-6.6.11_1... done. Installing DKMS module 'nvidia-535.154.05' for kernel-6.6.11_1... done. ``` Files in /boot/: ``` config-6.5.13_1 config-6.5.5_2 config-6.6.11_1 efi grub initramfs-5.15.60_1.img initramfs-6.0.19_1.img initramfs-6.1.46_1.img initramfs-6.1.55_2.img initramfs-6.1.71_1.img initramfs-6.3.13_2.img initramfs-6.5.13_1.img initramfs-6.5.5_2.img initramfs-6.6.11_1.img vmlinuz-6.5.13_1 vmlinuz-6.5.5_2 vmlinuz-6.6.11_1 ``` ### Steps to reproduce 1. Check for installed kernels with `xbps-query --regex -s '^linux[0-9.]+-[0-9._]+'` 2. Remove all old kernel packages with `xbps-remove -Rf linuxX.X` 3. Remove all old kernels with `vkpurge rm all` 4. Update system with `xbps-install -Su` 5. Check for old header packages with `xbps-query --regex -s '^linux[0-9.]+-headers'` 6. Check for old kernel files in /boot/