diff --git a/usr/lib/linuxmint/mintUpdate/kernelwindow.py b/usr/lib/linuxmint/mintUpdate/kernelwindow.py index 6fa64932..732d1199 100755 --- a/usr/lib/linuxmint/mintUpdate/kernelwindow.py +++ b/usr/lib/linuxmint/mintUpdate/kernelwindow.py @@ -436,12 +436,20 @@ def install_kernels(self, kernels): _KERNEL_PKG_NAMES = KERNEL_PKG_NAMES.copy() if kernel.installed: # also purge existing residual kernel packages - _KERNEL_PKG_NAMES.append("linux-image-unsigned-VERSION-KERNELTYPE") - _KERNEL_PKG_NAMES.append("linux-tools-VERSION") - _KERNEL_PKG_NAMES.append("linux-tools-VERSION-KERNELTYPE") + _KERNEL_PKG_NAMES.extend([ + "linux-image-unsigned-VERSION-KERNELTYPE", + "linux-tools-VERSION", + "linux-tools-VERSION-KERNELTYPE", + "linux-hwe-MAJOR_MINOR_VERSION-tools-VERSION", + "linux-hwe-MAJOR_MINOR_VERSION-headers-VERSION", + ]) for name in _KERNEL_PKG_NAMES: - name = name.replace("VERSION", kernel.version).replace("-KERNELTYPE", kernel.type) + name = (name + .replace("MAJOR_MINOR_VERSION", kernel.version.rpartition('.')[0]) + .replace("VERSION", kernel.version) + .replace("-KERNELTYPE", kernel.type) + ) if name in self.cache: pkg = self.cache[name] if kernel.installed: