Knowledgebase

How to remove outdated kernel on CloudLinux 8

To remove an outdated kernel on CloudLinux 8, you can follow these steps:

  1. Check Installed Kernels:

    • Start by checking which kernels are currently installed on your system. You can do this with the following command:
      bash

 

    • sudo rpm -qa | grep kernel
  • Identify the Outdated Kernel:

    • Identify the kernel package that you want to remove. It will likely have a version number indicating that it's outdated.
  • Remove the Outdated Kernel:

    • Use the yum remove command to remove the outdated kernel package. Replace kernel-package-name with the actual name of the outdated kernel package. For example:
      bash
    • sudo yum remove kernel-package-name
  • Update GRUB Configuration:

    • After removing the outdated kernel, it's important to update GRUB, which is the bootloader configuration, to reflect the changes. Use the following command:
      bash
    • sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  • Verify Boot Configuration:

    • It's a good practice to verify that the correct kernel is set as the default boot option in GRUB. You can check the contents of /boot/grub2/grub.cfg or use a GRUB menu at system startup.
  • Reboot the System:

    • To ensure that the changes take effect, you should reboot your system:
      bash

 

    • sudo reboot
  1. Verify the Kernel Removal:

    • After rebooting, run the command from step 1 again to ensure that the outdated kernel has been successfully removed.

Please note that it's generally recommended to keep at least one older kernel installed as a backup in case there are issues with the latest kernel. Removing all old kernels can potentially leave your system without a working kernel if there are problems with the newest one. Always exercise caution when removing kernels.

If you're not comfortable with these steps, or if you have any concerns about removing a kernel, consider seeking assistance from a system administrator or CloudLinux support.

  • 0 Users Found This Useful
Was this answer helpful?