Ubuntu 22.04: How to Free Up Space for the Update
Getting an error message during your Ubuntu 22.04 update because the /boot partition is full? Here’s how to clear up space safely and complete your update successfully.
Many Ubuntu users face this issue because the boot partition is too small. With just two quick steps, you can free up enough space to perform your update without errors.
Step 1: Remove Unused Kernel Files
Old Linux kernel and header files often take up valuable space in /boot. You can remove them automatically with this command:
sudo apt autoremove
This will delete all outdated and unnecessary kernel versions. If there’s still not enough free space, proceed with step 2.
Step 2: Compress initramfs for More Space
If you need even more space, you can compress your initramfs to reduce file size. Open the configuration file with administrator rights using the following command:
sudo nano /etc/initramfs-tools/initramfs.conf
In the nano editor, find the line starting with COMPRESS= and replace zstd with xz so that it looks like this:
COMPRESS=xz
Save and close the file with Ctrl + O followed by Ctrl + X. Then rebuild the initramfs with this command:
sudo update-initramfs -u -k all
Now your system should have enough free space to perform the Ubuntu update smoothly.
Summary: Quick Fix for Ubuntu Update Errors
By removing outdated kernels and compressing initramfs, you can easily free up space on /boot and ensure your Ubuntu 22.04 stays up to date without system interruptions. Regular cleanup helps keep your Linux environment stable and optimized.
For more Linux administration tips, check out our Linux Hosting solutions and DevOps automation guides.


