CentOS deletes the old (kernel) kernel

Source: Internet
Author: User
When CentOS updates the kernel, many startup items will be added during startup. we can delete the old kernel and keep the latest kernel so that some disk space (/boot) can be released ). (1) view the installed kernel command: rpm-qkernel display result: kernel-2.6.32-279.14.1.el6.i686kernel-2.6.32-279.el6.x CentOS Kernel updated, will lead to a lot of startup items, we can delete the old kernel, keep the latest kernel to release some disk space (/boot ).
(1) view installed kernels
Command: rpm-q kernel
Show Results: kernel-2.6.32-279.14.1.el6.i686
Kernel-2.6.32-279.el6.x86_64
Kernel-2.6.32-358.6.1.el6.x86_64
(2) method 1 of deleting the old kernel:
Install yum-utls: yum install-y 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 rpm-q kernel again to view kernel information, with only the latest two: kernel-2.6.32-279.el6.x86_64
Kernel-2.6.32-358.6.1.el6.x86_64 Method 2: rpm-e kernel-2.6.32-279.14.1.el6.i686
(3) set the number of permanent kernel installations. I have set two
Sudo vi/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.