Affected versions: Ubuntu 26.04 LTS

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Kernel package installation fails, preventing security updates and potentially leaving unbootable partial upgrades.

Environment & Reproduction

Occurs on systems with small dedicated /boot partitions and many retained kernels.

df -h /boot
uname -r
dpkg -l 'linux-image*' | grep '^ii'

Root Cause Analysis

Old kernel images and initramfs files consume available /boot space needed for new package payloads.

Quick Triage

Identify current and removable kernels quickly.

ls -lh /boot
apt list --installed 'linux-image-*' 2>/dev/null
apt-mark showmanual | grep linux-image

Step-by-Step Diagnosis

Map running kernel to installed packages and select safe cleanup candidates.

current=$(uname -r); echo $current
dpkg -l 'linux-image-[0-9]*' | awk '/^ii/{print $2}'
lsinitramfs /boot/initrd.img-$(uname -r) | head
Illustrative mockup for ubuntu-26-04-lts — terminal_or_shell
Inspecting /boot usage and installed kernels — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Purge old kernels while keeping current and one fallback kernel.

Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.

sudo apt autoremove --purge -y
sudo apt clean
sudo update-grub
df -h /boot
Illustrative mockup for ubuntu-26-04-lts — log_or_config
Removing old kernels to recover /boot space — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Manually purge specific old kernel packages when autoremove is conservative.

sudo apt purge -y linux-image- linux-headers-
sudo update-initramfs -u
sudo update-grub

Verification & Acceptance Criteria

Sufficient /boot space exists and pending kernel updates install cleanly.

df -h /boot
sudo apt update
sudo apt install -y --reinstall linux-generic

Rollback Plan

If boot instability appears, reinstall required kernel package from apt cache or repository.

sudo apt install -y linux-image-$(uname -r)
sudo update-grub

Prevention & Hardening

Monitor /boot utilization and automate safe kernel cleanup post-maintenance.

df -h /boot
apt-config dump | grep -i autoremove
systemctl list-timers | grep apt

Often linked with initramfs generation failures and interrupted dpkg transactions.

Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.

View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Ubuntu kernel package maintenance and recovery documentation.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.