run sudo dnf upgrade
This will sometimes result in the following error in Fedora CentOS or RHEL: /boot Requires at least xxMB more space on the filesystem, Let’s fix it!
List all installed kernel packages with:
yum list kernel
On Fedora 22+, CentOS 8 and RHEL 8+, use:
dnf list kernel
The kernel to be used will be Underlined and cannot be deleted:
To remove now unused kernels, install yum-utils (or dnf-utils) package and use package cleaning useful:
yum install yum-utils package-cleanup --oldkernels --count=2
To make it permanent, edit /etc/yum.conf and add the following line:
installonly_limit=2
On RHEL8/CentOS 8/Streams, use:
dnf remove --oldinstallonly --setopt installonly_limit=2 kernel
,
Original article from 2017:
I ran into the following error when updating a client’s CentOS 6 server using “yum update”:
Transaction Check Error: 11MB is required on the /boot filesystem to install the package kernel-2.6.32-358.2.1.el6.x86_64
error summary
Disk Requirements: The /boot file requires at least 11MB more space on the system.
To check free space on /boot I ran the following command: df -h
which gave the following output:
file system size used use %mounted use
/dev/vda3 136G 60G 70G 46% /
tmpfs 5.3G 0 5.3G 0% /dev/shm
/dev/vda1 99M 77M 17M 82% /boot
/usr/tmpDSK 1.3G 35M 1.2G 3% /tmp
As you can see the boot partition is 82% full.
Use this command to list installed kernels:
rpm -qa | grep kernel
result:
kernel-2.6.32-220.7.1.el6.x86_64
kernel-headers-2.6.32-358.2.1.el6.x86_64
dracat-kernel-004-303.el6.noarch
kernel-2.6.32-279.19.1.el6.x86_64
kernel-firmware-2.6.32-358.2.1.el6.noarch
kernel-2.6.32-279.9.1.el6.x86_64
So to remove the oldest kernel, I ran:
rpm -e kernel-2.6.32-220.7.1.el6.x86_64
Then: df -h
Output:
file system size used use %mounted use
/dev/vda3 136G 60G 70G 46% /
tmpfs 5.3G 0 5.3G 0% /dev/shm
/dev/vda1 99M 52M 42M 56% /boot
/usr/tmpDSK 1.3G 35M 1.2G 3% /tmp
As you can see it freed up more than needed over 11MB. So I tried yum -y update kernel again and this time it works. Finally, I removed the old one again:
rpm -e kernel-2.6.32-279.9.1.el6.x86_64 kernel-2.6.32-279.19.1.el6.x86_64
The end result, 70M FREE!
/dev/vda1 99M 25M 70M 26% /boot
Last Updated: August 13, 2021
Leave a Comment