No space left on device while update-initramfs

I looked into the /boot partition:

df /boot
Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/mmcblk0p1    461087 406677     30602  94% /boot

ls -lh /boot
total 395M
-rw-r--r-- 1 root root 2.3K Jan 23 02:18 boot.scr
-rw-r--r-- 1 root root 2.3K Jan  9 08:14 boot.scr.bak
-rw-r--r-- 1 root root 182K Nov 29 09:31 config-5.13.0-1-librem5
-rw-r--r-- 1 root root 182K Dec 20 17:34 config-5.15.0-1-librem5
-rw-r--r-- 1 root root 184K Jan 17 11:33 config-5.16.0-1-librem5
lrwxrwxrwx 1 root root   53 Jan 23 02:17 dtb -> dtbs/5.16.0-1-librem5/freescale/imx8mq-librem5-r4.dtb
lrwxrwxrwx 1 root root   53 Dec 10 07:55 dtb-5.13.0-1-librem5 -> dtbs/5.13.0-1-librem5/freescale/imx8mq-librem5-r4.dtb
lrwxrwxrwx 1 root root   53 Jan  9 08:14 dtb-5.15.0-1-librem5 -> dtbs/5.15.0-1-librem5/freescale/imx8mq-librem5-r4.dtb
lrwxrwxrwx 1 root root   53 Jan 23 02:17 dtb-5.16.0-1-librem5 -> dtbs/5.16.0-1-librem5/freescale/imx8mq-librem5-r4.dtb
drwxr-xr-x 5 root root 1.0K Jan 23 02:17 dtbs
drwxr-xr-x 2 root root 1.0K Jul 13  2021 grub
-rw-r--r-- 1 root root  62M Jan 23 02:18 initrd.img
-rw-r--r-- 1 root root  62M Dec 10 07:55 initrd.img-5.13.0-1-librem5
-rw-r--r-- 1 root root  62M Jan  9 08:14 initrd.img-5.15.0-1-librem5
-rw-r--r-- 1 root root  62M Jan 23 02:17 initrd.img-5.16.0-1-librem5
-rw-r--r-- 1 root root  62M Jan  9 08:14 initrd.img.bak
drwx------ 2 root root  12K Sep 11 07:31 lost+found
-rw-r--r-- 1 root root 4.7M Nov 29 09:31 System.map-5.13.0-1-librem5
-rw-r--r-- 1 root root 4.7M Dec 20 17:34 System.map-5.15.0-1-librem5
-rw-r--r-- 1 root root 4.8M Jan 17 11:33 System.map-5.16.0-1-librem5
-rw-r--r-- 1 root root  24M Jan 23 02:18 vmlinuz
-rw-r--r-- 1 root root 8.3M Nov 29 09:31 vmlinuz-5.13.0-1-librem5
-rw-r--r-- 1 root root 8.4M Dec 20 17:34 vmlinuz-5.15.0-1-librem5
-rw-r--r-- 1 root root 8.5M Jan 17 11:33 vmlinuz-5.16.0-1-librem5
-rw-r--r-- 1 root root  24M Jan  9 08:14 vmlinuz.bak

and decided to move the oldest file away:

sudo mv /boot/initrd.img-5.13.0-1-librem5 /home/purism

after this the sudo apt upgrade went fine and the device booted fine.

Why are the old initrd.img.... are keept? Which process should do the housekeeping there? The /boot partition remains 76% full and the problem could re-occure with next kernel update.

1 Like