Skip to content
statance
MenuClose
← All troubleshooting guides

The /boot partition is full

Linux

A full /boot is almost always old kernels. Check which kernel is running with uname -r, then remove unused ones with sudo apt autoremove --purge. Never remove the running kernel; if apt itself fails because /boot is full, remove one old kernel’s initrd image by hand first to give it room.

Symptoms

  • apt upgrade fails writing initramfs or vmlinuz
  • “No space left on device” during kernel updates
  • df -h shows /boot at 100%

How to diagnose it

  1. Check /boot usage and the running kernel

    Keep the running kernel and at least one known-good previous kernel.

    df -h /boot uname -r ls -lh /boot
  2. List installed kernels

    Packages are named linux-image-VERSION.

    dpkg --list | grep -E "linux-image-[0-9]" # Debian/Ubuntu rpm -q kernel # RHEL family

Common causes and fixes

Old kernels not auto-removed

Remove kernels no longer needed.

sudo apt autoremove --purge

apt is broken because /boot is full

Delete the initrd of an old kernel that is not running to free space, then let apt finish and clean up.

sudo rm /boot/initrd.img-OLD-VERSION # never the one matching uname -r sudo apt -f install && sudo apt autoremove --purge

RHEL family keeps too many kernels

Set installonly_limit=3 in /etc/dnf/dnf.conf and remove extras.

sudo dnf remove --oldinstallonly --setopt installonly_limit=2 kernel

Prevent it happening again

  • Run apt autoremove after kernel updates (unattended-upgrades can do this with Remove-Unused-Kernel-Packages).
  • Alert when DISK_used is above 80% — it tracks the fullest mount, which is often /boot.

Set it up: Ubuntu monitoring · Debian monitoring.

FAQ

How many kernels should I keep?

The running kernel plus one previous version is enough for most servers.

Does a full /boot break the server?

Not immediately, but kernel updates fail and can leave packages half-configured, which can stop the next boot if an initramfs is incomplete.

Related guides

Get alerted before this becomes an outage.

Install the agent in one line. Statance watches CPU, memory, disk and services, and its AI assistant helps find the cause.