WordPress Developer & Linux Administrator

Cleaning up your /boot partition

Sometimes, your /boot partition will become large, and near its limit. This is often caused by old kernels being left on your system. The following steps should help to get that cleaned up safely, and hopefully reduce the size of your boot partition. This will keep the latest two kernels on your system, and remove the others.

Do the following to keep just the last 2 kernels on your system, to keep /boot clean

Edit /etc/yum.conf and set the following parameter


This will make your package manager keep only the 2 latest kernels on your system (including the one that is running).

Install yum-utils

yum install yum-utils

Clean up your old kernels

package-cleanup --oldkernels --count=2

All done! This will erase (in a safe way) the old kernels, and, keep just the last 2 of them for future use or rolling back if necessary at a later date.


Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.