remove old kernels ? /boot partition is 85% full, need to free up the space
- - whm/ cpanel
How to remove old kernels ? /boot partition is 85% full, need to free up the space
How to remove old kernels on CentOS 7.9 (to free up boot partition)?
howto delete/remove/clean old kernels on CentOS 7.5
How to Delete Old Unused Kernels in CentOS
boot partition is almost full in CentOS
kernel



boot partition is 85%
Fedora/CentOS/RHEL

CentOS Linux Kernel

boot partition

backup

, 5 boot partition

boot partition 250 !

50

boot kernels

manual automatic

5 2

-----------------------------------------------------
Manual remove old kernels
-----------------------------------------------------

whm terminal " "
Check for current Kernel

:
uname -sr



" "

list all currently installed kernels

:
rpm -q kernel
:
kernel-3.10.0-1062.9.1.el7.x86_64
kernel-3.10.0-11
27.13.1.el7.x86_64
kernel-3.10.0-11
27.19.1.el7.x86_64
kernel-3.10.0-1160.6.1.el7.x86_64


1160 1062

+

" "


:
rpm -ev kernel-3.10.0-1062.9.1.el7.x86_64
automatic manual" "

:
Loaded plugins: fastestmirror, langpacks, product-id, versionlock
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-229.el7 will be erased
---> Package kernel.x86_64 0:3.10.0-229.14.1.el7 will be erased
---> Package kernel-devel.x86_64 0:3.10.0-229.1.2.el7 will be erased
---> Package kernel-devel.x86_64 0:3.10.0-229.14.1.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================
 Package                                       Arch                                    Version                                                Repository                                  Size
===============================================================================================================================================================================================
Removing:
 kernel                                        x86_64                                  3.10.0-229.el7                                         @anaconda                                  131 M
 kernel                                        x86_64                                  3.10.0-229.14.1.el7                                    @updates                                   131 M
 kernel-devel                                  x86_64                                  3.10.0-229.1.2.el7                                     @updates                                    32 M
 kernel-devel                                  x86_64                                  3.10.0-229.14.1.el7                                    @updates                                    32 M

Transaction Summary
===============================================================================================================================================================================================
Remove  4 Packages
Installed size: 326 M
Is this ok [y/N]: y

       
     y  

Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : kernel-devel.x86_64                            1/4 
  Erasing    : kernel.x86_64                                  2/4 
  Erasing    : kernel-devel.x86_64                            3/4 
  Erasing    : kernel.x86_64                                  4/4 
Loading mirror speeds from cached hostfile
 * base: centos.mirror.snu.edu.in
 * epel: repo.ugm.ac.id
 * extras: centos.mirror.snu.edu.in
 * rpmforge: kartolo.sby.datautama.net.id
 * updates: centos.mirror.snu.edu.in
  Verifying  : kernel-3.10.0-229.el7.x86_64                   1/4 
  Verifying  : kernel-devel-3.10.0-229.14.1.el7.x86_64        2/4 
  Verifying  : kernel-3.10.0-229.14.1.el7.x86_64              3/4 
  Verifying  : kernel-devel-3.10.0-229.1.2.el7.x86_64         4/4 

Removed:
  kernel.x86_64 0:3.10.0-229.el7           kernel.x86_64 0:3.10.0-229.14.1.el7           kernel-devel.x86_64 0:3.10.0-229.1.2.el7           kernel-devel.x86_64 0:3.10.0-229.14.1.el7          

Complete!
-----------------------------------------------------
Automatic remove old kernels
-----------------------------------------------------
, manual automatic

" yum-utils "
Install the yum-utils if they aren't installed
:
yum install yum-utils
" 2 "
Cleanup old kernels and don't keep more than 2
:
package-cleanup --oldkernels --count=2




-----------------------------------------------------
2 5
-----------------------------------------------------

boot

5

, 2 3 5



5 2

" 5 "

:
nano /etc/yum.conf


:
installonly_limit=5


:
installonly_limit=2


-----------------------------------------------------
System Update include Kernel
-----------------------------------------------------



Home Software System Update

update 3

2

installonly_limit 5 2

boot

-----------------------------------------------------

-----------------------------------------------------

Security



cPanel Security Advisor kernel update

KernelCare

update security



restart refresh .

-----------------------------------------------------
:
-----------------------------------------------------


Boot





,
,
100 !
.


system accounts
backup google drive

google drive .

:
CPanel whm backup to Google Drive


:
https://forums.cpanel.net/threads/bo...n-full.402022/
https://www.tecmint.com/delete-old-k...el-and-fedora/
https://serverfault.com/questions/56...boot-partition
https://www.if-not-true-then-false.c...-red-hat-rhel/
http://cpanelplesk.com/centos-redhat...e-old-kernels/
https://linuxconfig.org/how-to-remov...n-centos-linux
https://geektnt.com/how-to-remove-ol...helcentos.html
https://unix.stackexchange.com/quest...full-in-centos