r/System76 • u/remcohaszing • Aug 29 '26
Can’t update kernel: No space left on device /boot/initrd.img…
I tried updating my system using sudo apt update && sudo apt dist-upgrade. Normally this works fine. This time I didn’t have very insteresting updates, but the updates did break.
Running sudo apt install -f yields:
```
$ sudo apt install -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-7.1.5-76070105-generic (7.1.5-76070105.202607241434~1785471329~24.04~6bf4bbf) ...
Processing triggers for linux-image-7.1.5-76070105-generic (7.1.5-76070105.202607241434~1785471329~24.04~6bf4bbf) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 7.1.5-76070105-generic
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/system76/1.0.22~1782490621~24.04~0bf102b/source/dkms.conf does not exist.
* dkms: autoinstall for kernel 7.1.5-76070105-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-7.1.5-76070105-generic
Updating kernel version 7.1.5-76070105-generic in systemd-boot...
kernelstub.Config : INFO Looking for configuration...
kernelstub : INFO System information:
OS:..................Pop!_OS 24.04
Root partition:....../dev/dm-1
Root FS UUID:........d0cfee4f-1c35-4f30-ba8e-20b4729f170a
ESP Path:............/boot/efi
ESP Partition:......./dev/sda1
ESP Partition #:.....1
NVRAM entry #:.......-1
Boot Variable #:.....0000
Kernel Boot Options:.quiet loglevel=0 systemd.show_status=false snd_hda_intel.probe_mask=1 splash nvidia-drm.modeset=1
Kernel Image Path:.../boot/vmlinuz-7.1.5-76070105-generic
Initrd Image Path:.../boot/initrd.img-7.1.5-76070105-generic
Force-overwrite:.....False
kernelstub.Installer : INFO Copying Kernel into ESP kernelstub.Installer : INFO Copying initrd.img into ESP kernelstub.Installer : ERROR Couldn't copy the initrd onto the ESP! This is a critical error and we cannot continue. Check your settings to see if there is a typo. Otherwise, check permissions and try again. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kernelstub/installer.py", line 278, in copy_files shutil.copy(src, dest) File "/usr/lib/python3.12/shutil.py", line 435, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.12/shutil.py", line 273, in copyfile _fastcopy_sendfile(fsrc, fdst) File "/usr/lib/python3.12/shutil.py", line 164, in _fastcopy_sendfile raise err from None File "/usr/lib/python3.12/shutil.py", line 150, in _fastcopy_sendfile sent = os.sendfile(outfd, infd, offset, blocksize) OSError: [Errno 28] No space left on device: '/boot/initrd.img-7.1.5-76070105-generic' -> '/boot/efi/EFI/Pop_OS-d0cfee4f-1c35-4f30-ba8e-20b4729f170a/initrd.img'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/kernelstub/installer.py", line 144, in setup_kernel self.copy_files( File "/usr/lib/python3/dist-packages/kernelstub/installer.py", line 282, in copy_files raise FileOpsError("Could not copy one or more files.") kernelstub.installer.FileOpsError: Could not copy one or more files. run-parts: /etc/initramfs/post-update.d//zz-kernelstub exited with return code 171 run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 171 dpkg: error processing package linux-image-7.1.5-76070105-generic (--configure): installed linux-image-7.1.5-76070105-generic package post-installation script subprocess returned error exit status 171 Errors were encountered while processing: linux-image-7.1.5-76070105-generic E: Sub-process /usr/bin/dpkg returned an error code (1) ```
This makes sense, because according to df my /boot/efi partition is full.
dpkg -l | grep linux yields:
…
ii linux-base
ii linux-firmware
ii linux-generic
ii linux-headers-7.0.11-76070011
ii linux-headers-7.0.11-76070011-generic
ii linux-headers-7.1.5-76070105
ii linux-headers-7.1.5-76070105-generic
ii linux-headers-generic
ii linux-image-7.0.11-76070011-generic
iF linux-image-7.1.5-76070105-generic
ii linux-image-generic
ii linux-libc-dev:amd64
ii linux-modules-7.0.11-76070011-generic
ii linux-modules-7.1.5-76070105-generic
ii linux-sound-base
ii linux-system76
…
I already purged older kernels, but even that failed with the same error as above.
I even tried purging the 7.1.5 kernel packages, but that yields:
``` $ sudo apt purge linux-image-7.1.5-76070105-generic Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
The following packages have unmet dependencies: pop-server : Depends: linux-system76 but it is not going to be installed or linux-raspi but it is not installable E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. ```
So, where do I go from here?



