Centos – Remove old Kernels

  1. Check to see if there are old kernels that can be uninstalled
    • rpm -q kernel
  2. Install the software that removes the old kernels
    • yum install yum-utils
  3. Clean up the old kernels setting the count to how many backup kernels you’d like to have
    • package-cleanup –oldkernels –count=2

Ubuntu – Remove old Kernels

  1. List the installed kernels
    • dpkg –list | grep linux-image
  2. Remove old kernels and other automatically installed packages that are no longer needed
    • apt autoremove –purge

Leave a Reply

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