Cleaning up old kernels (with kernel-ml)?

General support questions
Post Reply
Przemas
Posts: 58
Joined: 2015/07/22 11:32:28

Cleaning up old kernels (with kernel-ml)?

Post by Przemas » 2017/08/17 09:55:43

I've just got a message on low disk space on /boot - how do I clean old kernels and all the mess from there taking into account I have kernel-ml as well?

mghe
Posts: 766
Joined: 2015/11/24 12:04:43
Location: Katowice, Poland

Re: Cleaning up old kernels (with kernel-ml)?

Post by mghe » 2017/08/17 09:57:00

Choose kernel version to remove.

# yum remove kernel....

User avatar
TrevorH
Site Admin
Posts: 33221
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cleaning up old kernels (with kernel-ml)?

Post by TrevorH » 2017/08/17 10:11:43

package-cleanup --oldkernels --count 2

May need yum.conf amending with kernelpkgnames=kernel-ml but never tried with kernel-ml so it may work without or it may not work at all.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4532
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Cleaning up old kernels (with kernel-ml)?

Post by jlehtone » 2017/08/17 10:49:38

Yum has option 'installonly_limit'. The options default is 3, but CentOS seems to set the value to 5.

5 regular kernels and 5 kernel-ml definitely take some space.
As preventive maintenance, make it less.

bonedome
Posts: 201
Joined: 2017/04/22 08:11:04

Re: Cleaning up old kernels (with kernel-ml)?

Post by bonedome » 2017/08/19 10:28:34

Hello

Code: Select all

package-cleanup --oldkernels --count 2
works but will leave 4 kernels two 3.10 and two 4.12 (currently)

Post Reply