Cannot remove old kernels, Causes update/upgrade errors

DemonChicken1111

New Member
Jun 5, 2025
4
0
1
Hi! I've been trying to update and upgrade my proxmox installation, however I keep getting an error related to an EFI partition being full.

Code:
@homelab:/# apt-get install intel-microcode
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  iucode-tool
The following packages will be REMOVED:
  proxmox-kernel-6.8.12-8-pve-signed
The following NEW packages will be installed:
  intel-microcode iucode-tool
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0 B/11.6 MB of archives.
After this operation, 557 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 125768 files and directories currently installed.)
Removing proxmox-kernel-6.8.12-8-pve-signed (6.8.12-8) ...
Examining /etc/kernel/postrm.d.
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
update-initramfs: Deleting /boot/initrd.img-6.8.12-8-pve
run-parts: executing /etc/kernel/postrm.d/proxmox-auto-removal 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
run-parts: executing /etc/kernel/postrm.d/zz-proxmox-boot 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
Re-executing '/etc/kernel/postrm.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/B134-2B37
        Copying kernel and creating boot-entry for 5.15.158-2-pve
        Copying kernel and creating boot-entry for 6.8.12-11-pve
cp: error writing '/var/tmp/espmounts/B134-2B37/EFI/proxmox/6.8.12-11-pve/initrd.img-6.8.12-11-pve': No space left on device
run-parts: /etc/kernel/postrm.d/zz-proxmox-boot exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/proxmox-kernel-6.8.12-8-pve-signed.postrm line 15.
dpkg: error processing package proxmox-kernel-6.8.12-8-pve-signed (--remove):
 installed proxmox-kernel-6.8.12-8-pve-signed package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 proxmox-kernel-6.8.12-8-pve-signed
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Running proxmox-boot-tool gets me this:

Code:
@homelab:/# proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with uefi
B134-2B37 is configured with: uefi (versions: 5.15.158-2-pve, 6.8.12-10-pve, 6.8.12-11-pve)
B136-8FA7 is configured with: uefi (versions: 6.8.12-11-pve, 6.8.12-9-pve)
B138-258F is configured with: uefi (versions: 5.15.158-2-pve, 6.8.12-11-pve, 6.8.12-9-pve)
B139-5B94 is configured with: uefi (versions: 5.15.158-2-pve, 6.8.12-11-pve, 6.8.12-9-pve)

After mounting all of the EFI partitions my df -h looks like this:

Code:
@homelab:/# df -h
Filesystem        Size  Used Avail Use% Mounted on
udev               48G     0   48G   0% /dev
tmpfs             9.5G  1.7M  9.5G   1% /run
rpool/ROOT/pve-1  1.8T   48G  1.8T   3% /
tmpfs              48G   46M   48G   1% /dev/shm
tmpfs             5.0M     0  5.0M   0% /run/lock
efivarfs           64K   22K   38K  37% /sys/firmware/efi/efivars
rpool             1.8T  128K  1.8T   1% /rpool
rpool/ROOT        1.8T  128K  1.8T   1% /rpool/ROOT
rpool/data        1.8T  128K  1.8T   1% /rpool/data
/dev/fuse         128M   20K  128M   1% /etc/pve
tmpfs             9.5G     0  9.5G   0% /run/user/0
/dev/sdd2         511M  511M     0 100% /tmp/fixme/B134-2B37
/dev/sdb2         511M  144M  368M  29% /tmp/fixme/B136-8FA7
/dev/sda2         511M  213M  299M  42% /tmp/fixme/B138-258F
/dev/sdc2         511M  213M  299M  42% /tmp/fixme/B139-5B94

In the /dev/sdd2 partition I have an older kernel left over. I remove it, and it's configuration file, unmount the partition, and still receive the same error.

Code:
@homelab:/# ls tmp/fixme/B134-2B37/EFI/proxmox/
5.15.158-2-pve  6.8.12-10-pve  6.8.12-11-pve
@homelab:/# rm -rf /tmp/fixme/B134-2B37/EFI/proxmox/5.15.158-2-pve/
@homelab:/# rm /tmp/fixme/B134-2B37/loader/entries/proxmox-5.15.158-2-pve.conf
@homelab:/# umount /dev/sdd2
@homelab:/# apt-get install intel-microcode
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  iucode-tool
The following packages will be REMOVED:
  proxmox-kernel-6.8.12-8-pve-signed
The following NEW packages will be installed:
  intel-microcode iucode-tool
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0 B/11.6 MB of archives.
After this operation, 557 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 125768 files and directories currently installed.)
Removing proxmox-kernel-6.8.12-8-pve-signed (6.8.12-8) ...
Examining /etc/kernel/postrm.d.
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
update-initramfs: Deleting /boot/initrd.img-6.8.12-8-pve
run-parts: executing /etc/kernel/postrm.d/proxmox-auto-removal 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
run-parts: executing /etc/kernel/postrm.d/zz-proxmox-boot 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
Re-executing '/etc/kernel/postrm.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/B134-2B37
        Copying kernel and creating boot-entry for 5.15.158-2-pve
        Copying kernel and creating boot-entry for 6.8.12-11-pve
cp: error writing '/var/tmp/espmounts/B134-2B37/EFI/proxmox/6.8.12-11-pve/initrd.img-6.8.12-11-pve': No space left on device
run-parts: /etc/kernel/postrm.d/zz-proxmox-boot exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/proxmox-kernel-6.8.12-8-pve-signed.postrm line 15.
dpkg: error processing package proxmox-kernel-6.8.12-8-pve-signed (--remove):
 installed proxmox-kernel-6.8.12-8-pve-signed package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 proxmox-kernel-6.8.12-8-pve-signed
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

How should I go about further diagnoising and resolving this issue?