000035247 - How to remove old kernels on RSA Security Analytics appliances

Document created by RSA Customer Support Employee on Jun 10, 2017
Version 1Show Document
  • View in full screen mode

Article Content

Article Number000035247
Applies ToRSA Product Set: Security Analytics, NetWitness Logs and Packets
RSA Product/Service Type: Security Analytics Appliance
RSA Version/Condition: 10.4.x, 10.5.x, 10.6.x
Platform: CentOS
O/S Version: EL6
IssueBy default, CentOS and many Linux distributions keep a certain number of kernels installed.  That number is usually set to 5 although it may be changed by modifying a configuration file on the system.
Yum has a feature that will remove old kernels from the host via a simple CLI command.
The setting for number of kernels kept is found in /etc/yum.conf:  
cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5        ## This line limits the number of old kernels to 5.
ResolutionCheck the /boot/grub/grub.conf file to determine how many kernels are installed and decide on the number of older kernels  you would like to remove.
Use these steps to remove older kernels no longer needed.
  1. Logon to the host via ssh as root.
  2. Make sure yum-utils is installed (as it is normally by default)
rpm -qa | grep yum

root@NWAPPLIANCE001 ~]# rpm -qa | grep yum-util
yum-utils-1.1.30-17.el6_5.noarch

  1. Remove the two older, unwanted kernels with this command:
package-cleanup --oldkernels --count=<#>


  1. Remove all but the latest kernel:
    [root@NWAPPLIANCE001 ~]# package-cleanup --oldkernels --count=1
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    --> Running transaction check
    ---> Package kernel.x86_64 0:2.6.32-431.23.3.el6 will be erased
    ---> Package kernel.x86_64 0:2.6.32-431.29.2.el6 will be erased
    Remove all but the last two kernels:
    [root@NWAPPLIANCE001 ~]# package-cleanup --oldkernels --count=2
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    --> Running transaction check
    ---> Package kernel.x86_64 0:2.6.32-431.23.3.el6 will be erased
    --> Finished Dependency Resolution

Attachments

    Outcomes