E: mkinitramfs failure cpio 141 gzip 1

just running:

sudo apt autoremove

solved my problem

related: https://help.ubuntu.com/community/RemoveOldKernels


See How do I remove old kernel versions to clean up the boot menu? for removing old kernel images.

To rebuild the initial ram disks for the remaining kernels (ensuring that everyone has one properly built) run:

sudo update-initramfs -k all -u