How to fix E: /boot has insufficient space for new kernel in APT
The /boot partition is full and cannot install new kernel updates. This occurs when old kernel versions accumulate and consume all available space. Free up space by removing old unused kernels.
Quick fix
Fixes E: /boot has insufficient space for new kernel
df -h /boot- Verify /boot partition is full
- Identify your current running kernel
- List all installed kernels
- Remove old kernel packages
df -h /bootE: /boot has insufficient space for new kernel
What this error means
This error occurs when your /boot partition (which stores kernel images, initramfs files, and bootloader data) has reached 100% capacity. Most Linux systems allocate a separate /boot partition with limited space—typically only enough for 3-5 kernel versions. When kernel updates accumulate without old versions being removed, the partition fills up and prevents new kernel installations. This is a common issue on systems that haven't been maintained or have automatic updates enabled without cleanup policies.
Typical symptoms
- Kernel updates fail with 'insufficient space' error
- apt upgrade command cannot complete
- /boot partition shows 100% usage with 'df -h /boot'
- System boots normally but cannot install security updates
- apt autoremove command has no effect (partition already full)
Common causes
- Multiple old kernel versions stored in /boot directory (most common)
- initramfs files from previous kernels consuming space
- Kernel images not automatically cleaned up after updates
- /boot partition sized too small for the expected kernel count
- Compressed initramfs not enabled (larger initrd.img files)
How to fix "E: /boot has insufficient space for new kernel"
Check the current space usage of the /boot partition:
df -h /bootIf the 'Use%' column shows 100%, the partition is indeed full.
Find the kernel version you are currently running (do not remove this one):
uname -rExample output: 5.15.0-91-generic. This is the kernel you must keep.
View all installed kernel packages:
dpkg -l | grep linux-imageThis shows all kernel versions. Identify old ones (lower version numbers) that differ from your current running kernel.
Remove old kernel packages one at a time. Replace VERSION-NUMBER with the kernel version you want to remove:
sudo apt remove --purge linux-image-VERSION-NUMBER-generic
sudo apt remove --purge linux-image-unsigned-VERSION-NUMBER-genericExample:
sudo apt remove --purge linux-image-5.13.0-44-generic
sudo apt remove --purge linux-image-unsigned-5.13.0-44-genericRemove the 2-3 oldest kernels, keeping at least one older kernel as a backup in case the current kernel has issues.
After removing old kernels, run autoremove to clean up related dependencies:
sudo apt autoremove --purgeThen update the bootloader configuration:
sudo update-grubConfirm that /boot partition now has free space:
df -h /bootYou should see the 'Use%' below 80%. You can now proceed with kernel updates.
If the partition is so full that apt cannot run, use dpkg directly:
sudo dpkg --configure -a
sudo dpkg --purge $(dpkg -l | grep linux-image | awk '{print $2}' | grep -v $(uname -r | sed 's/-[a-z]*$//'))
sudo apt-get -f installThis forcefully removes old kernel packages without relying on apt's dependency resolution.
Advanced notes
Prevention: To prevent this issue, keep only 2-3 recent kernels. Add to /etc/apt/apt.conf.d/50unattended-upgrades (if using unattended-upgrades):
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";Alternatively, reduce initramfs compression overhead by enabling xz compression in /etc/initramfs-tools/initramfs.conf:
COMPRESS=xzThen rebuild:
sudo update-initramfs -u -k allLong-term: If /boot is frequently full, consider resizing the partition to 1GB using gparted or similar tools. Most modern systems should have 500MB-1GB for /boot to safely hold 4-5 kernel versions.
Frequently asked questions
- What does "E: /boot has insufficient space for new kernel" mean?
- This error occurs when your /boot partition (which stores kernel images, initramfs files, and bootloader data) has reached 100% capacity. Most Linux systems allocate a separate /boot partition with limited space—typically only enough for 3-5 kernel versions. When kernel updates accumulate without old versions being removed, the partition fills up and prevents new kernel installations.
- How do I fix "E: /boot has insufficient space for new kernel"?
- The /boot partition is full and cannot install new kernel updates. This occurs when old kernel versions accumulate and consume all available space. Free up space by removing old unused kernels.
- What causes "E: /boot has insufficient space for new kernel"?
- Multiple old kernel versions stored in /boot directory (most common) initramfs files from previous kernels consuming space Kernel images not automatically cleaned up after updates
- Is the "E: /boot has insufficient space for new kernel" error serious?
- Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.