Your /boot partition on Linux is full, and kernel updates fail with "No space left on device". You may be able to fix it by removing old kernels or shrinking the initramfs. If /boot is simply too small, it has to be resized from a live USB or moved to a bigger partition. The steps here are for traditional Ubuntu, Debian, Fedora and RHEL installations that use apt or dnf. Fedora Atomic desktops such as Silverblue and Kinoite use rpm-ostree instead, so follow Fedora's documentation for those.
What Causes the /boot Partition to Fill Up?
/boot holds the Linux kernel, its initramfs (the small image that starts the system) and the GRUB files. Each kernel update adds a new kernel and initramfs, and old ones are meant to be removed.
Old kernels pile up. If automatic removal isn't set up, or an upgrade was interrupted, old kernels stay. Each one with its initramfs can take tens of megabytes or more.
A small /boot from install time. Older installers and some cloud images made /boot only a few hundred megabytes. Kernels and initramfs images have grown since, so it fills sooner.
Large initramfs images. By default, Ubuntu and Debian build an initramfs with most drivers in it, which makes each one big. Changing that can free a lot of space.
Rescue images. On Fedora and RHEL, a rescue kernel and initramfs, usually named vmlinuz-0-rescue-MACHINE-ID and initramfs-0-rescue-MACHINE-ID.img, can take a large share of a small /boot. Removing the dracut-config-rescue package stops new ones being made.
Layout limits. /boot often sits at the start of the disk with the root partition, an LVM volume or an encrypted volume straight after it, so there's no free space next to it to grow into.
The EFI System Partition. On UEFI systems a separate small partition is mounted at /boot/efi. It fills for different reasons, such as leftover bootloaders from other installs, and a full one gives similar errors.
Start by checking. Run df -h /boot /boot/efi to see how full each is, and lsblk -f to see the layout.
To see what's taking the space, run ls -lh /boot. Each kernel has a vmlinuz file and an initrd or initramfs file with the same version number. Add the two together for the newest kernel, and allow for at least three kernels when you decide how big /boot needs to be.
Increase Boot Partition Size: Quick Fix by Removing Old Kernels
Before touching partitions, clear the space you don't need. Always keep the kernel you're running (uname -r shows it), the newest installed kernel if it differs, and a known-good fallback.
Remove Old Kernels With the Package Manager Easy
- Ubuntu and Debian.
Runsudo apt autoremove --purgeand read the package list before you confirm. Only go ahead if it keeps the running kernel, the newest installed kernel if it differs, and a known-good fallback. - See what's left.
Rundpkg -l 'linux-image-*' | grep ^iito list installed kernel packages. It also lists kernel meta-packages, such aslinux-image-genericorlinux-image-amd64. Don't remove those, because they bring in future kernel updates. To remove a specific old image, runsudo apt purge linux-image-VERSIONwith its exact version. Never remove the version shown byuname -r, the newest installed version if it differs, or your known-good fallback. - Fedora and RHEL.
Runsudo dnf remove --oldinstallonlyto remove old kernels beyond the limit, or remove a specific one withsudo dnf remove kernel-core-VERSION. - Check the space.
Rundf -h /bootagain, then finish any update that failed.
Recover an Upgrade That Failed Halfway Medium
- Know the signs.
On Ubuntu and Debian, apt refuses to do anything and suggestsapt --fix-broken install, which also fails because /boot is full. - Purge one old kernel with dpkg.
Find an old image package whose name contains the exact old kernel version, not a kernel meta-package such aslinux-image-genericorlinux-image-amd64. Then runsudo dpkg --purge linux-image-VERSIONonly for a version that is neither running nor the newest installed one. Keep a known-good fallback. If dpkg reports a dependency error, don't purgelinux-modules-VERSIONfirst. Choose another old image, or stop and get help. - Finish the upgrade.
Runsudo apt -f install, thensudo apt autoremove --purge. - Check GRUB updated.
Runsudo update-grubso the menu matches the kernels you have.
Clear Space on a Full EFI Partition Medium
- See what's using it.
Ifdf -h /boot/efiis the full one, runsudo du -sh /boot/efi/EFI/*. Each folder belongs to a bootloader, such as ubuntu, fedora, Microsoft or BOOT. - Back it up.
Copy the EFI files first:sudo cp -a /boot/efi ~/efi-backup. - Remove only what's gone.
If a folder belongs to a system you've removed from this disk, delete that folder. Never delete the Microsoft folder on a dual-boot PC, or BOOT, or the one for the system you're running.
Increase Boot Partition Size with a Partition Manager (Recommended)
Clearing old kernels isn't always enough on a small /boot. If it's still nearly full, make each kernel smaller first, then make /boot itself bigger.
Shrink the Initramfs Medium
- Ubuntu and Debian.
Edit/etc/initramfs-tools/initramfs.confand changeMODULES=mosttoMODULES=dep, so only the drivers this machine needs are included. - Use stronger compression.
In the same file,COMPRESS=xzis the option to try if you need a smaller image. Don't assumezstdwill save space, and use only a method your installed kernel supports. - Rebuild.
Runsudo update-initramfs -u -k "$(uname -r)", thendf -h /boot. Restart and test that kernel before rebuilding any others. - Keep a fallback.
Leave an older kernel's existing initramfs unchanged until the rebuilt kernel has booted successfully. If it won't boot, choose that older kernel from GRUB's Advanced options and change the setting back.
sudo update-initramfs -u -k all before you move it.Resize /boot Using GParted From a Live USB Hard
- Boot live media.
Write the GParted Live ISO, or your distribution's live ISO, to a USB stick and boot from it. Running from live media keeps the partitions out of use while you shrink and move them. - Make room next to /boot.
In GParted, shrink the partition after /boot from its start, leaving free space directly after /boot. Moving the start of a big partition rewrites much of it and can take a long time; don't interrupt it. - Grow /boot.
Resize /boot into the free space. Aim for at least 2 GiB (2,048 MiB), and allow more if you keep many kernels or have large initramfs images. GParted grows the ext4 filesystem with it. - Apply and check.
Click Apply, wait for it to finish, reboot into your system and rundf -h /boot.
If the partition after /boot is an LVM physical volume or LUKS-encrypted, don't use the generic shrink step above. GParted can resize supported LVM and LUKS layouts, but a LUKS mapping must be open to resize it and closed to move it. Back up first, read the current GParted manual, or move /boot instead.
Advanced: Increase Boot Partition Size by Migrating to a New Partition
When the free space is elsewhere on the disk rather than next to /boot, /boot can't grow into it. Create a bigger partition there instead and move /boot across.
Move /boot to a New, Larger Partition Hard
lsblk -f shows them, and on NVMe drives they look like /dev/nvme0n1p2.- Create and format the partition.
From the live USB, create a partition of at least 2 GiB (2,048 MiB) in free space with GParted, and format it ext4, for examplesudo mkfs.ext4 -L boot /dev/sdX3. - Copy /boot across.
Mount the old and new partitions, for example at/mnt/oldbootand/mnt/newboot, and runsudo rsync -aHAX /mnt/oldboot/ /mnt/newboot/. The trailing slashes copy the contents. - Point fstab at it.
Get the new UUID withsudo blkid /dev/sdX3. Mount the root partition at/mnt, open/mnt/etc/fstaband replace the first field on the/bootline withUUID=NEW-UUIDfor the new partition. - Reinstall GRUB on Ubuntu or Debian.
Mount the new /boot at/mnt/bootand, on UEFI, the EFI partition at/mnt/boot/efi. Bind-mount/dev,/procand/sys, then runsudo chroot /mnt. On BIOS, rungrub-install /dev/sdX. On UEFI, boot the live USB in UEFI mode, then rungrub-installwith no disk. Runupdate-gruband exit the chroot. Fedora and RHEL need their release-specific vendor repair procedure, especially with Secure Boot. - Test before removing the old one.
Reboot, checkdf -h /bootshows the new partition, and boot a few times before deleting the old /boot partition.
Virtual Machines and LVM Hard
- Back up the VM.
Make a tested backup or export first. A snapshot or checkpoint can help with a short-term rollback, but it isn't a backup. - Grow the virtual disk.
Follow your hypervisor's current disk-expansion procedure. It may require the VM to be shut down or checkpoints to be merged first. Then use the new unallocated space at the end of the disk for a new /boot, as in fix 6. - LVM with free space.
Free space in a volume group is inside its physical volumes, so it can't be used directly for a normal /boot partition. Reducing a physical volume and its partition may need data moved first and can lose data. Back up first. If you can't map the layers confidently, use another disk for /boot or get help.
lsblk shows a layout you don't recognise, such as encryption, RAID, several disks or a Windows dual boot, stop before moving partitions and get help. If the system won't boot after a change, don't keep trying fixes; boot the live USB and copy your data off first. On a work server, follow your change process.The GNU parted manual and the Arch Linux wiki on parted explain partition types and flags if you need them.
Preventing /boot From Filling Up Again
With room on /boot again, these stop it filling up.
- Remove old kernels automatically. On Ubuntu, unattended-upgrades can remove unused kernels (Remove-Unused-Kernel-Packages); otherwise run
sudo apt autoremove --purgeafter updates. On Fedora, keepinstallonly_limitin/etc/dnf/dnf.confat 3. - Keep the initramfs small. On Ubuntu and Debian, MODULES=dep and a suitable compression method can keep each kernel update from eating space. Fedora and RHEL use dracut, so use their documented dracut settings instead.
- Size /boot generously. On a new install, at least 2 GiB (2,048 MiB) for /boot leaves room for growth. Many installers now put /boot on the root filesystem unless encryption or the layout needs it separate.
- Watch it. Check
df -h /bootnow and then, especially on servers and VMs that update automatically. - Restart after kernel updates. Until you restart, the old kernel is still running, and autoremove keeps it, so space isn't freed.
- Back up before disk work. Keep a current backup before any resize or move.
Increase Boot Partition Size: Summary
When /boot is full, check it with df -h /boot and remove old kernels with apt or dnf, keeping the running kernel, the newest installed version if it differs, and a known-good fallback. If an upgrade broke halfway, use dpkg to purge only an old kernel that is neither running nor the newest installed, then run sudo apt -f install. A smaller initramfs frees more.
If /boot is still too small, back up, boot a live USB and enlarge it with GParted, or create a new partition, copy /boot across, update fstab and reinstall GRUB. Test the new /boot before removing the old one.

