Centos 6.3 delete old Kernel

Source: Internet
Author: User


Centos 6.3 often updates the kernel, resulting in many startup items added during startup. we can delete the old kernel and keep the latest kernel to release some disk space.

(1) view installed kernels

command: rpm-Q kernel
display result: kernel-2.6.32-279.el6.i686
kernel-2.6.32-279.9.1.el6.i686
kernel-2.6.32-279.11.1.el6.i686
kernel-2.6.32-279.14.1.el6.i686
(2) Delete old kernel

Install Yum-UTLS: sudo install Yum-utils

Set how many old kernels you want to retain, for example, I want to keep two: sudo package-cleanup -- oldkernels -- count = 2

Run the rpm-Q kernel command again to view the kernel information. There are only two latest kernel information:
Kernel-2.6.32-279.11.1.el6.i686
Kernel-2.6.32-279.14.1.el6.i686

(3) set the number of permanent kernel installations. I have set two

Sudo gedit/etc/yum. conf

Set installonly_limit = 2

(4) restart and you will only see two kernel boot items.


 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.