How to remove old unused Kernel from CentOS 7

When you update the CentOS Linux, the update add a new kernel image in the system but update will not remove your old kernel. To remove these unused kernel .you can used yum command .

Firstly you check which kernel is running on your Machine.

[root@localhost ~]# uname -r

Below are the list of installed kernel on your CentOS machine

[root@localhost ~]# rpm -qa kernel
[root@localhost ~]#

You can use yum command to remove old unused kernel from the CentOS Linux

[root@localhost ~]# yum erase kernel-3.10.0-693.5.2.el7.x86_64
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
–> Running transaction check
—> Package kernel.x86_64 0:3.10.0-693.5.2.el7 will be erased
–> Finished Dependency Resolution

Dependencies Resolved

Package                                      Arch                      Version             Repository             Size
kernel                                        x86_64            3.10.0-693.5.2.el7    @updates               59 M

Transaction Summary
Remove 1 Package

Installed size: 59 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : kernel-3.10.0-693.5.2.el7.x86_64 1/1
Verifying : kernel-3.10.0-693.5.2.el7.x86_64 1/1

kernel.x86_64 0:3.10.0-693.5.2.el7

[root@localhost ~]#

One thought on “How to remove old unused Kernel from CentOS 7

  1. Pingback: Ho to Configure yum utility to auto-remove old unused kernels | The Linux Operating System (CentOS / Red Hat / Fedora / Ubuntu / Scientific Linux / FreeBSD)

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s