Latest apt upgrade fails due to insufficient /boot space


This is more of a heads up, not a big deal but I just ran an apt upgrade on my system and it failed with

update-initramfs: Generating /boot/initrd.img-5.8.0-2parrot1-amd64
pigz: abort: write error on <stdout> (No space left on device)
E: mkinitramfs failure cpio 141 pigz 28
update-initramfs: failed for /boot/initrd.img-5.8.0-2parrot1-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned 
error exit status 1
Errors were encountered while processing:
Scanning application launchers
Removing duplicate launchers from Debian
Launchers are updated
E: Sub-process /usr/bin/dpkg returned an error code (1)
└──╼ $df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7.8G     0  7.8G   0% /dev
tmpfs           1.6G  1.1M  1.6G   1% /run
/dev/sda5        41G  6.9G   29G  20% /
tmpfs           7.9G     0  7.9G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           4.0M     0  4.0M   0% /sys/fs/cgroup
/dev/sda1       464M  404M   32M  93% /boot
Temp            466G  230G  236G  50% /media/sf_Temp
tmpfs           1.6G   76K  1.6G   1% /run/user/1000

as you can see /boot is 93% full.
I let the installer choose how big to create partitions automatically and as you can see there is plenty of space on the disk, but /boot has become full but 29GB is free on /

The /boot directory stores unused Linux Kernel packages which is probably taking the majority of space.

You can try running the command sudo apt autoremove which removes unused packages like old kernels, read more at man apt. Note that some users experience trouble with that command.

What I’ve been doing is using Synaptic to manually uninstall old Linux Kernels while keeping the 2 or 3 newest Linux Kernel releases. If you’re unsure if uninstalling a specific version will break your system you can run the following command that does not require sudo (read more):
apt-get --simulate remove <name of kernel>

I hope this helps, though I’m sure there are better methods for maintain storage space in the boot directory.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.