Remove Old Unused Kernels in CentOS Rumi, January 26, 2023 To display the current version of Linux (kernel) running on your system, run this command. # uname -sr Linux 3.10.0-327.10.1.el7.x86_64 List All Installed Kernels on System You can list all kernel images installed on your system like this. # rpm -q kernel kernel-3.10.0-229.el7.x86_64 kernel-3.10.0-229.14.1.el7.x86_64 kernel-3.10.0-327.3.1.el7.x86_64 kernel-3.10.0-327.10.1.el7.x86_64 Removing Old/Unused Kernels on CentOS/RHEL You need to install yum-utils, which is an assortment of utilities that integrate with yum to make it more powerful and easier to use, by extending its original features in several different ways. # yum install yum-utils One of these utilities is package-cleanup which you can use to delete old kernel as shown below, the count flag is used to specify the number of kernels you want to leave on the system. # package-cleanup --oldkernels --count=2 Removing Old Kernels 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 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! Important: After running the above command, it will remove all old/unused kernels and keep the current running and old latest kernel as backup. Src: https://www.tecmint.com/delete-old-kernels-in-centos-rhel-and-fedora/ Related Administrations Configurations (Linux) CentOSKernel
How Do I Know if I’m Running 32-bit or 64-bit Linux March 8, 2011 Few Basic Command- Using 'uname' uname –m 'uname' more uname –a Now something different- cat /etc/*release or cat /etc/*version Related Read More
Setup mail server on centos 7 using postfix and dovecot March 30, 2021 Installing packages Step 1 » Assign hostname for the server using the below command. [root@krizna ~]# hostnamectl set-hostname mail.krizna.com Step 2 » Make a host entry with your IP in /etc/hosts file. 172.27.0.51 mail.krizna.com Step 3 » Now start installing packages. [root@krizna ~]# yum -y install postfix dovecot After package… Read More
BIND ACL to restrict zone trasfer with IP address December 17, 2017 You need to define ACL in /etc/named.conf or /etc/bind/named.conf.local file. Let us say IP 1.2.3.4 and 1.2.3.5 are allowed to transfer your zones. # vi named.conf or vi /etc/bind/named.conf.local Here is sample entry for domain domain.org.bd (ns1 configuration): acl trusted-servers { 1.2.3.4; //ns1 1.2.3.5; //ns2 }; zone “domain.org.bd” { type… Read More