Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
5.3.7 Removing old kernels in CentOS and Fedora (freeing up space in /boot)
Attention!
The kernel removal procedure is irreversible. Before uninstalling, be sure to test the current kernel for performance.You can view a list of all installed kernels using the command:
rpm -q kernel
Install yum-utils:
yum install yum-utils -y
Remove unnecessary kernels by running:
package-cleanup --oldkernels --count=2
Where --count=2 — the number of system cores that need to be left (in the example — 2).
To automatically remove kernels during an update, you must change the parameter installonly_limit in /etc/yum.conf:
installonly_limit=3
Attention!
Cannot be greatly reducedinstallonly_limit (especially below 2), as this can provoke situations in which the server will stop working after the update.