I am running Ubuntu 22.04 with ZFS on root. My boot partition is only 1.8GB - I find that it is constantly running out of space with snapshots of just a couple kernel updates.
dpkg -l | grep linux-image | grep ^ii
reports that I have 4 kernels installed:
ii linux-image-5.15.0-100-generic 5.15.0-100.110 amd64 Signed kernel image genericii linux-image-5.15.0-92-generic 5.15.0-92.102 amd64 Signed kernel image genericii linux-image-6.5.0-17-generic 6.5.0-17.17~22.04.1 amd64 Signed kernel image genericii linux-image-6.5.0-25-generic 6.5.0-25.25~22.04.1 amd64 Signed kernel image genericii linux-image-generic 5.15.0.100.97 amd64 Generic Linux kernel imageii linux-image-generic-hwe-22.04 6.5.0.25.25~22.04.12 amd64 Generic Linux kernel image
Ideally, I would only have 2 kernels installed at a time to keep snapshots smaller. However, sudo apt autoremove
insists on keeping 2 HWE (6.5.*) and 2 GA (5.15.*) kernels around.
I only am using the HWE kernels and not the GA ones. sudo apt remove linux-image-generic linux-headers-generic --dry-run
suggests that this would allow the GA kernels to be auto removed. My question is whether it is safe to do this? Will it potentially cause problems in the future when upgrading to a new version of Ubuntu?
I also noticed that the linux-generic
package isn't installed, only linux-generic-hwe-20.04
(not sure why) and linux-generic-hwe-22.04
. So I'm wondering if maybe the linux-image-generic
and linux-headers-generic
shouldn't be there either?