Free Up Space on Ubuntu’s /boot Partition with Simple Commands
This guide explains why the /boot partition can fill up on Ubuntu, shows how to check its usage, safely remove old kernel and header packages, clean apt caches, and verify that space has been reclaimed for future updates.
Step 1: Check /boot Partition Usage
Use the df -h command to display disk usage for all partitions and note the percentage used by /boot.
df -hStep 2: Remove Old Kernel Files
Ubuntu keeps previous kernels in /boot (files start with vmlinuz and initrd.img). List installed kernels, identify those not in use, and purge them. dpkg -l | grep linux-image Then purge each unwanted kernel version, replacing <linux-image-version> with the actual package name.
sudo apt-get purge <linux-image-version>Step 3: Clean Unneeded Kernel Header Packages
Header packages correspond to each kernel version and also occupy space. List them and purge the ones you no longer need.
dpkg -l | grep linux-headers sudo apt-get purge <linux-headers-version>Step 4: Clear Unnecessary Packages and Cache
Remove the apt cache and any packages that are no longer required.
sudo apt-get clean sudo apt-get autocleanStep 5: Verify /boot Space Is Reclaimed
Run df -h again to ensure the /boot partition now has sufficient free space, confirming that the system can install new kernels and updates.
df -hConclusion
By checking the partition, removing outdated kernels and headers, and cleaning apt caches, you can quickly free space on Ubuntu’s /boot partition, preventing installation failures for future kernel upgrades.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
