I am running out of space on the disk '/boot'. When trying to use the software updater, a message appears suggesting to remove old kernels using sudo apt autoremove, and to set COMPRESS=xz in initramfs.conf.
Similarly to this question, sudo apt autoremove did not make a difference. Then, I tried with the second alternative.
However, after setting COMPRESS=xz, I need to rebuild the initramfs.conf image. For this I use sudo update-initramfs -u -k all (as suggested in the answer of the above post/question), but it does not work due to lack of space. The output is the folllowing:
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/vgubuntu-swap_1)
I: Set the RESUME variable to override this.
xz: (stdout): Write error: No space left on device
E: mkinitramfs failure xz --check=crc32 --threads=0 1
update-initramfs: failed for /boot/initrd.img-5.15.0-67-generic with 1.