tag:blogger.com,1999:blog-8057107437144001218.post678413937427824089..comments2023-11-14T03:39:59.957-05:00Comments on Adventures in Switching to Linux: Removing Old Linux Kernels on CentOSForresthttp://www.blogger.com/profile/08156739167001456236noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-8057107437144001218.post-42225354973485952912013-01-18T01:06:42.222-05:002013-01-18T01:06:42.222-05:00Great post!
I realize you left the 3 latest versio...Great post!<br />I realize you left the 3 latest versions or your kernels. I Think it could have be done much easier by using the following commands:<br /><br />yum install yum-utils<br />package-cleanup --oldkernels --count=3<br /><br />that should remove all but the latest three kernels version regardless how many you may have installed.<br /><br />You could even make this settings permanent by editing the /etc/yum.conf file and change this line as follows:<br />installonly_limit=3omostanhttps://www.blogger.com/profile/10443292425381420573noreply@blogger.comtag:blogger.com,1999:blog-8057107437144001218.post-48913101505718090882009-09-16T08:30:49.261-04:002009-09-16T08:30:49.261-04:00Your line is very wrong. You can destroy half your...Your line is very wrong. You can destroy half your OS with it. Do the following:<br /><br />yum remove $(rpm -q kernel | grep -v `uname -r`)Unknownhttps://www.blogger.com/profile/08137621135481497274noreply@blogger.comtag:blogger.com,1999:blog-8057107437144001218.post-79142578026283133672008-11-19T09:03:00.000-05:002008-11-19T09:03:00.000-05:00Or, for the more adventurous. Modify to taste.yum ...Or, for the more adventurous. Modify to taste.<BR/><BR/>yum remove $(rpm -qa | grep kernel | grep -v `uname -r`)Unknownhttps://www.blogger.com/profile/07365934868852357017noreply@blogger.comtag:blogger.com,1999:blog-8057107437144001218.post-87142179370756815862008-09-15T07:09:00.000-04:002008-09-15T07:09:00.000-04:00You can use "yum remove kernel-x.y.z" to remove th...You can use "yum remove kernel-x.y.z" to remove the kernel, which also removes the grub.conf entry for it.Bertlhttps://www.blogger.com/profile/11924413138574360699noreply@blogger.com