{"id":3850,"date":"2018-06-28T20:52:11","date_gmt":"2018-06-28T19:52:11","guid":{"rendered":"http:\/\/tomaskalabis.com\/wordpress\/?p=3850"},"modified":"2018-06-29T15:22:08","modified_gmt":"2018-06-29T14:22:08","slug":"how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel","status":"publish","type":"post","link":"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/","title":{"rendered":"How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL)"},"content":{"rendered":"<h3>How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL)<\/h3>\n<p>This post is about how to remove old kernels on CentOS, Fedora or Red Hat (RHEL), the main reason why you want remove kernel is limited disk space on server, this task is easy. For remove i use yum-utils package.<\/p>\n<pre class=\"theme:shell-default lang:default decode:true\">[root@tka-fedora ~]# uname -sr\r\nLinux 4.16.5-200.fc27.x86_64<\/pre>\n<p>run this commnad to display the current verison of kernel &#8211; in my case\u00a0<strong>Linux 4.16.5-200.fc27.x86_64<\/strong><\/p>\n<pre class=\"theme:shell-default lang:default decode:true \">[root@tka-fedora ~]# rpm -q kernel\r\nkernel-4.13.9-300.fc27.x86_64\r\nkernel-4.15.17-300.fc27.x86_64\r\nkernel-4.16.5-200.fc27.x86_64<\/pre>\n<p>to list all kernel images installed on your system use this command (3 kernel images)<\/p>\n<pre class=\"theme:shell-default lang:default decode:true \">yum -y install yum-utils<\/pre>\n<p>as i mentioned before, to remove old kernel images i use yum-utils package, which you need install on your server<\/p>\n<pre class=\"theme:shell-default lang:default decode:true\">package-cleanup --oldkernels --count=2<\/pre>\n<p>to remove old kernel images use package-cleanup command &#8211;count=2 mean that you have only 2 kernel images after start the remove process.<\/p>\n<pre class=\"theme:shell-default lang:default decode:true \">[root@tka-fedora ~]# rpm -q kernel\r\nkernel-4.15.17-300.fc27.x86_64\r\nkernel-4.16.5-200.fc27.x86_64<\/pre>\n<p>after remove i have only 2 kernel images \ud83d\ude42<\/p>\n<h4>Remove old Kernels automatically<\/h4>\n<p>set the kernel limit in the yum.conf &#8211; <strong>installonly_limit=2 = only 2 kernel images\u00a0<\/strong><\/p>\n<pre class=\"theme:shell-default lang:default decode:true\">[root@tka-fedora ~]# vi \/etc\/yum.conf\r\n\r\n[main]\r\ncachedir=\/var\/cache\/yum\/$basearch\/$releasever\r\nkeepcache=0\r\ndebuglevel=2\r\nlogfile=\/var\/log\/yum.log\r\nexactarch=1\r\nobsoletes=1\r\ngpgcheck=1\r\nplugins=1\r\ninstallonly_limit=2<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL) This post is about how to remove old kernels on CentOS, Fedora or Red Hat (RHEL), the &#8230;<\/p>\n","protected":false},"author":2,"featured_media":2361,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[140,229],"tags":[132,133,167],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL) -<\/title>\n<meta name=\"description\" content=\"how to remove old kernels on CentOS, Fedora or Red Hat (RHEL), the main reason why you want remove kernel is limited disk space on server, this task is easy. For remove i use yum-utils package.\u00a0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/\" \/>\n<meta property=\"og:locale\" content=\"cs_CZ\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL) -\" \/>\n<meta property=\"og:description\" content=\"how to remove old kernels on CentOS, Fedora or Red Hat (RHEL), the main reason why you want remove kernel is limited disk space on server, this task is easy. For remove i use yum-utils package.\u00a0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/\" \/>\n<meta property=\"og:site_name\" content=\"tomaskalabis.com\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-28T19:52:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-06-29T14:22:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tomaskalabis.com\/wordpress\/wp-content\/uploads\/2015\/07\/centos-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"180\" \/>\n\t<meta property=\"og:image:height\" content=\"180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Tomas Kalabis\" \/>\n<meta name=\"twitter:label1\" content=\"Napsal(a)\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tomas Kalabis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Odhadovan\u00e1 doba \u010dten\u00ed\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuta\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/\",\"url\":\"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/\",\"name\":\"How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL) -\",\"isPartOf\":{\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/tomaskalabis.com\/wordpress\/wp-content\/uploads\/2015\/07\/centos-logo.jpg\",\"datePublished\":\"2018-06-28T19:52:11+00:00\",\"dateModified\":\"2018-06-29T14:22:08+00:00\",\"author\":{\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/#\/schema\/person\/8e7e83f618a561ed3734a38cef4cf1d6\"},\"description\":\"how to remove old kernels on CentOS, Fedora or Red Hat (RHEL), the main reason why you want remove kernel is limited disk space on server, this task is easy. For remove i use yum-utils package.\u00a0\",\"breadcrumb\":{\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/#breadcrumb\"},\"inLanguage\":\"cs\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/#primaryimage\",\"url\":\"https:\/\/tomaskalabis.com\/wordpress\/wp-content\/uploads\/2015\/07\/centos-logo.jpg\",\"contentUrl\":\"https:\/\/tomaskalabis.com\/wordpress\/wp-content\/uploads\/2015\/07\/centos-logo.jpg\",\"width\":180,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tomaskalabis.com\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/#website\",\"url\":\"https:\/\/tomaskalabis.com\/wordpress\/\",\"name\":\"tomaskalabis.com\",\"description\":\"my personal blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tomaskalabis.com\/wordpress\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"cs\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/#\/schema\/person\/8e7e83f618a561ed3734a38cef4cf1d6\",\"name\":\"Tomas Kalabis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\/\/tomaskalabis.com\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9f7e4796b38d5720e8a07b918f423311?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9f7e4796b38d5720e8a07b918f423311?s=96&d=retro&r=g\",\"caption\":\"Tomas Kalabis\"},\"sameAs\":[\"https:\/\/x.com\/tomaskalabis\"],\"url\":\"https:\/\/tomaskalabis.com\/wordpress\/author\/kalabis\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL) -","description":"how to remove old kernels on CentOS, Fedora or Red Hat (RHEL), the main reason why you want remove kernel is limited disk space on server, this task is easy. For remove i use yum-utils package.\u00a0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/","og_locale":"cs_CZ","og_type":"article","og_title":"How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL) -","og_description":"how to remove old kernels on CentOS, Fedora or Red Hat (RHEL), the main reason why you want remove kernel is limited disk space on server, this task is easy. For remove i use yum-utils package.\u00a0","og_url":"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/","og_site_name":"tomaskalabis.com","article_published_time":"2018-06-28T19:52:11+00:00","article_modified_time":"2018-06-29T14:22:08+00:00","og_image":[{"width":180,"height":180,"url":"https:\/\/tomaskalabis.com\/wordpress\/wp-content\/uploads\/2015\/07\/centos-logo.jpg","type":"image\/jpeg"}],"author":"Tomas Kalabis","twitter_misc":{"Napsal(a)":"Tomas Kalabis","Odhadovan\u00e1 doba \u010dten\u00ed":"1 minuta"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/","url":"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/","name":"How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL) -","isPartOf":{"@id":"https:\/\/tomaskalabis.com\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/#primaryimage"},"image":{"@id":"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/#primaryimage"},"thumbnailUrl":"https:\/\/tomaskalabis.com\/wordpress\/wp-content\/uploads\/2015\/07\/centos-logo.jpg","datePublished":"2018-06-28T19:52:11+00:00","dateModified":"2018-06-29T14:22:08+00:00","author":{"@id":"https:\/\/tomaskalabis.com\/wordpress\/#\/schema\/person\/8e7e83f618a561ed3734a38cef4cf1d6"},"description":"how to remove old kernels on CentOS, Fedora or Red Hat (RHEL), the main reason why you want remove kernel is limited disk space on server, this task is easy. For remove i use yum-utils package.\u00a0","breadcrumb":{"@id":"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/#breadcrumb"},"inLanguage":"cs","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/"]}]},{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/#primaryimage","url":"https:\/\/tomaskalabis.com\/wordpress\/wp-content\/uploads\/2015\/07\/centos-logo.jpg","contentUrl":"https:\/\/tomaskalabis.com\/wordpress\/wp-content\/uploads\/2015\/07\/centos-logo.jpg","width":180,"height":180},{"@type":"BreadcrumbList","@id":"https:\/\/tomaskalabis.com\/wordpress\/how-to-delete-old-kernel-images-in-fedora-centos-and-red-hat-rhel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tomaskalabis.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"How to delete old Kernel images in Fedora, Centos and Red Hat (RHEL)"}]},{"@type":"WebSite","@id":"https:\/\/tomaskalabis.com\/wordpress\/#website","url":"https:\/\/tomaskalabis.com\/wordpress\/","name":"tomaskalabis.com","description":"my personal blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tomaskalabis.com\/wordpress\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"cs"},{"@type":"Person","@id":"https:\/\/tomaskalabis.com\/wordpress\/#\/schema\/person\/8e7e83f618a561ed3734a38cef4cf1d6","name":"Tomas Kalabis","image":{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/tomaskalabis.com\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9f7e4796b38d5720e8a07b918f423311?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9f7e4796b38d5720e8a07b918f423311?s=96&d=retro&r=g","caption":"Tomas Kalabis"},"sameAs":["https:\/\/x.com\/tomaskalabis"],"url":"https:\/\/tomaskalabis.com\/wordpress\/author\/kalabis\/"}]}},"jetpack_featured_media_url":"https:\/\/tomaskalabis.com\/wordpress\/wp-content\/uploads\/2015\/07\/centos-logo.jpg","_links":{"self":[{"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/posts\/3850"}],"collection":[{"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3850"}],"version-history":[{"count":5,"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/posts\/3850\/revisions"}],"predecessor-version":[{"id":3855,"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/posts\/3850\/revisions\/3855"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/media\/2361"}],"wp:attachment":[{"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tomaskalabis.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}