<!DOCTYPE html>
<html lang="zh-Hans">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5">
    <title>How to Remove Old Kernels on Ubuntu 16.04, 18.04, and 19.04 | 云图网</title>
    <meta name="description" content="Introduction In Linux, the kernel is the core of the operating system. As new versions of Linux are released, your system may update to a newer kernel. By defau…">
<meta property="og:type" content="article">
<meta property="og:url" content="https://blog.ytso.com/tech/aiops/224154.html">
<meta property="og:site_name" content="云图网">
<meta property="og:title" content="How to Remove Old Kernels on Ubuntu 16.04, 18.04, and 19.04">
<meta property="og:image" content="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072439521.png">
<meta property="og:description" content="Introduction In Linux, the kernel is the core of the operating system. As new versions of Linux are released, your system may update to a newer kernel. By defau…">
<link rel="canonical" href="https://blog.ytso.com/tech/aiops/224154.html">
<meta name="applicable-device" content="pc,mobile">
<meta http-equiv="Cache-Control" content="no-transform">
<link rel="shortcut icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg">
<link rel='dns-prefetch' href='//cdnjs.cloudflare.com' />
<style id='wp-img-auto-sizes-contain-inline-css' type='text/css'>
img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px}
/*# sourceURL=wp-img-auto-sizes-contain-inline-css */
</style>
<link rel='stylesheet' id='stylesheet-css' href='https://blog.ytso.com/wp-content/themes/justnews/css/style.css?ver=6.21.5' type='text/css' media='all' />
<link rel='stylesheet' id='material-icons-css' href='https://blog.ytso.com/wp-content/themes/justnews/themer/assets/css/material-icons.css?ver=6.21.5' type='text/css' media='all' />
<link rel='stylesheet' id='remixicon-css' href='https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.min.css?ver=6.9.4' type='text/css' media='all' />
<link rel='stylesheet' id='font-awesome-css' href='https://blog.ytso.com/wp-content/themes/justnews/themer/assets/css/font-awesome.css?ver=6.21.5' type='text/css' media='all' />
<style id='wp-block-library-inline-css' type='text/css'>
:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}.has-text-align-center{text-align:center}.has-text-align-left{text-align:left}.has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}}
/*wp_block_styles_on_demand_placeholder:69ce224d8daee*/
/*# sourceURL=wp-block-library-inline-css */
</style>
<style id='classic-theme-styles-inline-css' type='text/css'>
/*! This file is auto-generated */
.wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
/*# sourceURL=/wp-includes/css/classic-themes.min.css */
</style>
<link rel='stylesheet' id='wpcom-member-css' href='https://blog.ytso.com/wp-content/plugins/wpcom-member/css/style.css?ver=1.7.19' type='text/css' media='all' />
<script type="text/javascript" src="https://blog.ytso.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1" id="jquery-core-js"></script>
<script type="text/javascript" src="https://blog.ytso.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1" id="jquery-migrate-js"></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://blog.ytso.com/xmlrpc.php?rsd" />
<meta name='description' content='Introduction In Linux, the kernel is the core of the operating system. As new versions of Linux are released, your system may update to a newer kernel. By default, modern Linux versions keep the curr…' />
<style>:root{--theme-color: #08c; --theme-hover: #07c; --logo-height: 32px; --logo-height-mobile: 26px; --menu-item-gap: 28px; --member-login-bg: url('https://blog.ytso.com/loginwall.jpg'); --header-bg-color: #fff; --header-bg-image: none; --theme-border-radius-s: 3px; --theme-border-radius-m: 5px; --theme-border-radius-l: 8px; --theme-border-radius-xl: 12px; --thumb-ratio-default: 480 / 300; --thumb-ratio-post: 480 / 300; --post-video-ratio: 860 / 482;}</style>
<link rel="icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" sizes="32x32" />
<link rel="icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" sizes="192x192" />
<link rel="apple-touch-icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" />
<meta name="msapplication-TileImage" content="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" />
    <!--[if lte IE 11]><script src="https://blog.ytso.com/wp-content/themes/justnews/js/update.js"></script><![endif]-->
</head>
<body class="wp-singular post-template-default single single-post postid-224154 single-format-standard wp-theme-justnews lang-cn el-boxed header-fixed">
<header class="header header-fluid">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse" aria-label="menu">
                <span class="icon-bar icon-bar-1"></span>
                <span class="icon-bar icon-bar-2"></span>
                <span class="icon-bar icon-bar-3"></span>
            </button>
                        <div class="logo">
                <a href="https://blog.ytso.com/" rel="home">
                    <img src="https://imgcdn.ytso.com/wp-content/uploads/2021/12/20211207181156143.png" alt="云图网">
                </a>
            </div>
        </div>
        <div class="collapse navbar-collapse mobile-style-0">
            <nav class="primary-menu"><ul id="menu-justnews-footer-menu" class="nav navbar-nav wpcom-adv-menu"><li class="menu-item"><a href="https://blog.ytso.com/category/industrynews">业界资讯</a></li>
<li class="menu-item current-post-ancestor active menu-item-style menu-item-style-1 dropdown"><a target="_blank" href="https://blog.ytso.com/category/tech" class="dropdown-toggle">技术专区</a>
<ul class="dropdown-menu menu-item-wrap menu-item-col-5">
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/cloud">云计算</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/ai">人工智能</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/safety">信息安全</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/bigdata">大数据</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/dev">研发管理</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/webdev">大前端</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/opensource">开源</a></li>
	<li class="menu-item current-post-ancestor current-post-parent active"><a href="https://blog.ytso.com/category/tech/aiops">智能运维</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/pnotes">编程笔记</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/wp">WordPress</a></li>
</ul>
</li>
<li class="menu-item"><a href="https://blog.ytso.com/category/enterprise-strategic-planning">企业战略规划</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/download">下载专区</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/it%e6%b1%9f%e6%b9%96%e5%8f%b2">江湖史</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/notes">随笔记录</a></li>
</ul></nav>            <div class="navbar-action">
                <div class="navbar-search-icon j-navbar-search"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></div><form class="navbar-search" action="https://blog.ytso.com/" method="get" role="search"><div class="navbar-search-inner"><i class="wpcom-icon wi navbar-search-close"><svg aria-hidden="true"><use xlink:href="#wi-close"></use></svg></i><input type="text" name="s" class="navbar-search-input" autocomplete="off" maxlength="100" placeholder="输入关键词搜索..." value=""><button class="navbar-search-btn" type="submit" aria-label="搜索"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></button></div></form>                    <div id="j-user-wrap">
                        <a class="login" href="https://blog.ytso.com/login">登录</a>
                        <a class="login register" href="https://blog.ytso.com/register">注册</a>
                    </div>
                                            <a class="wpcom-btn btn-primary btn-xs publish" href="https://blog.ytso.com/contribute">
                            <i class="fa fa-edit"></i> 投稿                        </a>
                                </div>
        </div>
    </div><!-- /.container -->
</header>

<div id="wrap">    <div class="wrap container">
        <ol class="breadcrumb" vocab="https://schema.org/" typeof="BreadcrumbList"><li class="home" property="itemListElement" typeof="ListItem"><a href="https://blog.ytso.com" property="item" typeof="WebPage"><span property="name" class="hide">云图网</span>首页</a><meta property="position" content="1"></li><li property="itemListElement" typeof="ListItem"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-3"></use></svg></i><a href="https://blog.ytso.com/category/tech" property="item" typeof="WebPage"><span property="name">技术专区</span></a><meta property="position" content="2"></li><li property="itemListElement" typeof="ListItem"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-3"></use></svg></i><a href="https://blog.ytso.com/category/tech/aiops" property="item" typeof="WebPage"><span property="name">智能运维</span></a><meta property="position" content="3"></li></ol>        <main class="main">
                            <article id="post-224154" class="post-224154 post type-post status-publish format-standard hentry category-aiops entry">
                    <div class="entry-main">
                                                                        <div class="entry-head">
                            <h1 class="entry-title">How to Remove Old Kernels on Ubuntu 16.04, 18.04, and 19.04</h1>
                            <div class="entry-info">
                                                                <time class="entry-date published" datetime="2022-01-07T07:22:03+08:00" pubdate>
                                    2022年1月7日 07:22                                </time>
                                <span class="dot">•</span>
                                <a href="https://blog.ytso.com/category/tech/aiops" rel="category tag">智能运维</a>                                                            </div>
                        </div>
                        
                                                <div class="entry-content text-indent text-justify">
                            <div id="toc">
<p class="toc-title"><strong>文章目录</strong><span class="toc-controller toc-controller-show">[隐藏]</span></p>
<ul>
<li class="toc-level2"><a href="#ftoc-heading-1">Remove Old Kernel Ubuntu 18.04 and 19.04</a>
<ul>
<li class="toc-level3"><a href="#ftoc-heading-2">Display a List of Kernel Versions</a></li>
<li class="toc-level3"><a href="#ftoc-heading-3">Remove All Old Kernels Using the Command Line</a></li>
<li class="toc-level3"><a href="#ftoc-heading-4">Manually Remove Individual Kernels from Command-Line</a></li>
<li class="toc-level3"><a href="#ftoc-heading-5">Use Graphical Tools to Remove Old Kernels in Ubuntu 18.04.</a>
<ul>
<li class="toc-level4"><a href="#ftoc-heading-6">How to Remove an Old Kernel with Synaptic</a></li>
<li class="toc-level4"><a href="#ftoc-heading-7">How to Remove an Old Kernel with Ubuntu Cleaner</a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-level2"><a href="#ftoc-heading-8">How to Delete Old Unused Kernels in Ubuntu 16.04 and Older</a>
<ul>
<li class="toc-level3"><a href="#ftoc-heading-9">Remove Old Kernels Using Ubuntu Software Center</a></li>
</ul>
</li>
</ul>
</div>
<p class="h3">Introduction</p>
<p>In Linux, the <strong>kernel</strong> is the core of the operating system. As new versions of Linux are released, your system may <a href="https://phoenixnap.com/kb/how-to-update-kernel-ubuntu" target="_blank" rel="noreferrer noopener">update to a newer kernel</a>.</p>
<p>By default, modern Linux versions keep the current kernel, plus one older version. However, in some instances, Linux doesn’t remove old versions of the kernel. One common problem of having old kernels is having an extensive list of bootable kernels on the GRUB (boot) menu.</p>
<p><strong>This guide will help you remove old and unused Linux kernels on your Ubuntu system.</strong></p>
<div class="wp-block-image"><noscript><img fetchpriority="high" decoding="async" width="800" height="400" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072439521.png" alt="Tutorial on how to remove old or unused kernels on Ubuntu 18.04." class="wp-image-92602" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/how-to-remove-old-or-unused-kernels-on-ubuntu.png"/></noscript><img fetchpriority="high" decoding="async" width="800" height="400" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072439521.png" alt="Tutorial on how to remove old or unused kernels on Ubuntu 18.04." class="wp-image-92602 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/how-to-remove-old-or-unused-kernels-on-ubuntu.png"/><noscript><noscript><img decoding="async" width="800" height="400" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072439521.png" alt="Tutorial on how to remove old or unused kernels on Ubuntu 18.04." class="wp-image-92602"/></noscript><img decoding="async" width="800" height="400" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072439521.png" alt="Tutorial on how to remove old or unused kernels on Ubuntu 18.04." class="wp-image-92602 j-lazy"/></noscript></div>
<p class="h3">Prerequisites</p>
<ul>
<li>A system running Ubuntu 19.04, 18.04, 16.04</li>
<li>A terminal window / command line (Ctrl+Alt+T, search &gt; terminal)</li>
<li>A user account with&nbsp;<strong>sudo</strong>&nbsp;privileges</li>
</ul>
<h2 class="ftwp-heading" id="ftoc-heading-1">Remove Old Kernel Ubuntu 18.04 and 19.04</h2>
<h3 class="ftwp-heading" id="ftoc-heading-2">Display a List of Kernel Versions</h3>
<p>To view a list of all kernel versions installed,&nbsp; entering the following:</p>
<pre class="wp-block-code"><code>sudo dpkg ––list | egrep –i ––color ‘linux-image|linux-headers’</code></pre>
<p>The output shows a list of all files labeled <strong>linux-image</strong> or <strong>linux-header</strong>. Use this to get an approximate number of old kernels on your system.</p>
<p>You can also count the number of kernels with the command:</p>
<pre class="wp-block-code"><code>sudo dpkg ––list | egrep –i ––color ‘linux-image|linux-headers’ | wc –l</code></pre>
<p>This command displays the total number of both linux-image and linux-headers.</p>
<div class="wp-block-image"><noscript><img decoding="async" width="731" height="87" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072440391.png" alt="Displaying the number of linux images and Linux headers on Ubuntu" class="wp-image-91032" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/number-of-linux-images-and-linux-headers.png"/></noscript><img decoding="async" width="731" height="87" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072440391.png" alt="Displaying the number of linux images and Linux headers on Ubuntu" class="wp-image-91032 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/number-of-linux-images-and-linux-headers.png"/><noscript><noscript><img decoding="async" width="731" height="87" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072440391.png" alt="Displaying the number of linux images and Linux headers on Ubuntu" class="wp-image-91032"/></noscript><img decoding="async" width="731" height="87" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072440391.png" alt="Displaying the number of linux images and Linux headers on Ubuntu" class="wp-image-91032 j-lazy"/></noscript></div>
<p>Need to find out which <a href="https://phoenixnap.com/kb/how-to-check-ubuntu-version" target="_blank" rel="noreferrer noopener">Ubuntu Kernel version is running</a>?</p>
<h3 class="ftwp-heading" id="ftoc-heading-3">Remove All Old Kernels Using the Command Line</h3>
<p>The <strong>apt</strong> package manager can <strong>automatically remove all old kernels</strong>. To do so, run the command:</p>
<pre class="wp-block-code"><code>sudo apt-get ––purge autoremove</code></pre>
<p>The system scans for unused kernels and displays a summary of the files it wants to delete. It prompts you to confirm your choice to remove old kernels by pressing <strong><code>y</code></strong> and <strong>Enter</strong> to delete.</p>
<div class="notice-note">
<div class="note-icon-wrapper"><i class="fa fa-lightbulb"></i></div>
<div class="notice-text">
<p><strong>Note:</strong> If you still haven’t had the chance, check out the newest features and improvements from the <a href="https://phoenixnap.com/kb/linux-kernel-5-0-released" target="_blank" rel="noopener">Linux Kernel 5.0</a> or <a href="https://phoenixnap.com/kb/linux-kernel-5-7-features" target="_blank" rel="noopener">Linux Kernel 5.7</a> upgrades.</p>
</div>
</div>
<h3 class="ftwp-heading" id="ftoc-heading-4">Manually Remove Individual Kernels from Command-Line</h3>
<p>You can manually remove an individual kernel by naming it specifically.</p>
<p>1. First,<strong> list the kernels</strong> with their installation status:</p>
<pre class="wp-block-code"><code>dpkg -l | tail -n +6 | grep -E &#039;linux-image-&#091;0-9]+&#039; | grep -Fv $(uname -r)</code></pre>
<p>The first two letters for each kernel indicate its status:</p>
<ul>
<li><strong>rc</strong>&nbsp;– already removed</li>
<li><strong>ii&nbsp;</strong>– installed, eligible for removal</li>
<li><strong>iU&nbsp;</strong>– downloaded and queued for installation</li>
</ul>
<div class="wp-block-image"><noscript><img decoding="async" width="732" height="185" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072442307.png" alt="List kernels with installation status on Linux to find kernels available for removal." class="wp-image-91063" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/list-kernels-with-installation-status.png"/></noscript><img decoding="async" width="732" height="185" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072442307.png" alt="List kernels with installation status on Linux to find kernels available for removal." class="wp-image-91063 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/list-kernels-with-installation-status.png"/><noscript><noscript><img decoding="async" width="732" height="185" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072442307.png" alt="List kernels with installation status on Linux to find kernels available for removal." class="wp-image-91063"/></noscript><img decoding="async" width="732" height="185" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072442307.png" alt="List kernels with installation status on Linux to find kernels available for removal." class="wp-image-91063 j-lazy"/></noscript></div>
<p>2. Remove a kernel with the <strong><code>ii</code></strong>&nbsp;status:</p>
<pre class="wp-block-code"><code>sudo dpkg ––purge &#091;kernel_version]</code></pre>
<p>Make sure you type the exact name and number of the kernel you want to remove. For example:</p>
<pre class="wp-block-code"><code>sudo dpkg ––purge linux-image-5.3.0-28-generic</code></pre>
<h3 class="ftwp-heading" id="ftoc-heading-5">Use Graphical Tools to Remove Old Kernels in Ubuntu 18.04.</h3>
<p>The command-line interface can, at times, be difficult to navigate when working with large sets of data. Using additional graphical tools can give you a better perspective and prevent you from making costly mistakes.</p>
<p>This section focuses on how to remove old kernels using <a href="https://www.nongnu.org/synaptic/" target="_blank" rel="noreferrer noopener">Synaptic</a> and<strong> Ubuntu Cleaner </strong>on Ubuntu 18.04. These tools can remove a wide variety of unneeded data, such as cached web browser histories, old kernels, and other unwanted software.</p>
<h4 class="ftwp-heading" id="ftoc-heading-6">How to Remove an Old Kernel with Synaptic</h4>
<p>Synaptic is a graphical front-end for the apt package manager, and it allows you to install, remove, and upgrade software packages.</p>
<p>Like most tools of this type, it’s necessary to locate the software packages you intend to remove, mark them for removal, and confirm your choice to complete the removal process.</p>
<p>Install Synaptic by entering the following command in your command line:</p>
<pre class="wp-block-code"><code>sudo apt install synaptic -y</code></pre>
<p>The installation takes a few moments to complete. Launch the Synaptic interface from your terminal by typing:</p>
<pre class="wp-block-code"><code>sudo synaptic</code></pre>
<p>You now have access to the Synaptic Package Manager graphical interface.</p>
<p>1. Click on the <strong>Sections </strong>tab.</p>
<div class="wp-block-image"><noscript><img decoding="async" width="800" height="501" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072443486.png" alt="Location of the Section tab in the Synaptic GUI." class="wp-image-92563" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/synaptic-section-tab-remove-old-kernel.png"/></noscript><img decoding="async" width="800" height="501" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072443486.png" alt="Location of the Section tab in the Synaptic GUI." class="wp-image-92563 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/synaptic-section-tab-remove-old-kernel.png"/><noscript><noscript><img decoding="async" width="800" height="501" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072443486.png" alt="Location of the Section tab in the Synaptic GUI." class="wp-image-92563"/></noscript><img decoding="async" width="800" height="501" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072443486.png" alt="Location of the Section tab in the Synaptic GUI." class="wp-image-92563 j-lazy"/></noscript></div>
<ol start="2">
<li>Locate the <strong>Kernel and modules</strong> option from the list.</li>
<li>Click the Kernel you want to remove and select the <strong>Mark for Complete Removal </strong>option.</li>
</ol>
<div class="wp-block-image"><noscript><img decoding="async" width="800" height="494" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072445454.png" alt="Select Kernel and Modules and select the kernels to remove completly." class="wp-image-92564" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/synaptic-remove-old-kernel-ubuntu.png"/></noscript><img decoding="async" width="800" height="494" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072445454.png" alt="Select Kernel and Modules and select the kernels to remove completly." class="wp-image-92564 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/synaptic-remove-old-kernel-ubuntu.png"/><noscript><noscript><img decoding="async" width="800" height="494" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072445454.png" alt="Select Kernel and Modules and select the kernels to remove completly." class="wp-image-92564"/></noscript><img decoding="async" width="800" height="494" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072445454.png" alt="Select Kernel and Modules and select the kernels to remove completly." class="wp-image-92564 j-lazy"/></noscript></div>
<ol start="4">
<li>Synaptic informs you that dependent packages need to be removed as well. Luckily, Synaptic automatically marks them for you once you click the <strong>Mark </strong>option.</li>
</ol>
<div class="wp-block-image"><noscript><img decoding="async" width="800" height="550" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072446147.png" alt="If necessary the systems infroms you that dependent packages need to be removed as well." class="wp-image-92565" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/synaptic-mark-additional-changes-remove-ubuntu-old-kernel.png"/></noscript><img decoding="async" width="800" height="550" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072446147.png" alt="If necessary the systems infroms you that dependent packages need to be removed as well." class="wp-image-92565 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/synaptic-mark-additional-changes-remove-ubuntu-old-kernel.png"/><noscript><noscript><img decoding="async" width="800" height="550" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072446147.png" alt="If necessary the systems infroms you that dependent packages need to be removed as well." class="wp-image-92565"/></noscript><img decoding="async" width="800" height="550" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072446147.png" alt="If necessary the systems infroms you that dependent packages need to be removed as well." class="wp-image-92565 j-lazy"/></noscript></div>
<ol start="5">
<li>Review the marked packages and click <strong>Apply </strong>once you are satisfied.</li>
</ol>
<div class="wp-block-image"><noscript><img decoding="async" width="800" height="543" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072448690.png" alt="The kernels are marked and click the Apply button." class="wp-image-92566" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/apply-synaptic-remove-old-kernel-ubuntu.png"/></noscript><img decoding="async" width="800" height="543" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072448690.png" alt="The kernels are marked and click the Apply button." class="wp-image-92566 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/apply-synaptic-remove-old-kernel-ubuntu.png"/><noscript><noscript><img decoding="async" width="800" height="543" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072448690.png" alt="The kernels are marked and click the Apply button." class="wp-image-92566"/></noscript><img decoding="async" width="800" height="543" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072448690.png" alt="The kernels are marked and click the Apply button." class="wp-image-92566 j-lazy"/></noscript></div>
<ol start="6">
<li>To complete the removal process, click <strong>Apply </strong>in the pop-up <em>Summary</em> window.</li>
</ol>
<div class="wp-block-image"><noscript><img decoding="async" width="798" height="549" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072450265.png" alt="List of changes for you to confirm." class="wp-image-92568" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/remove-old-kernel-confirm-synaptic.png"/></noscript><img decoding="async" width="798" height="549" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072450265.png" alt="List of changes for you to confirm." class="wp-image-92568 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/remove-old-kernel-confirm-synaptic.png"/><noscript><noscript><img decoding="async" width="798" height="549" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072450265.png" alt="List of changes for you to confirm." class="wp-image-92568"/></noscript><img decoding="async" width="798" height="549" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072450265.png" alt="List of changes for you to confirm." class="wp-image-92568 j-lazy"/></noscript></div>
<ol start="7">
<li>A progress bar allows you to control and review the removal process. Close the window manually once the system informs it has successfully removed the old kernels. Alternatively, check the box to auto close once the process is complete.</li>
</ol>
<div class="wp-block-image"><noscript><img decoding="async" width="800" height="417" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072451692.png" alt="Progress bar for the removal of th old kernels. Process completed." class="wp-image-92570" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/remove-old-kernel-synaptic-finish-process.png"/></noscript><img decoding="async" width="800" height="417" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072451692.png" alt="Progress bar for the removal of th old kernels. Process completed." class="wp-image-92570 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/remove-old-kernel-synaptic-finish-process.png"/><noscript><noscript><img decoding="async" width="800" height="417" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072451692.png" alt="Progress bar for the removal of th old kernels. Process completed." class="wp-image-92570"/></noscript><img decoding="async" width="800" height="417" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072451692.png" alt="Progress bar for the removal of th old kernels. Process completed." class="wp-image-92570 j-lazy"/></noscript></div>
<h4 class="ftwp-heading" id="ftoc-heading-7">How to Remove an Old Kernel with Ubuntu Cleaner</h4>
<p>Ubuntu Cleaner allows you to maintain your system at optimal levels by removing unnecessary browser caches, packages, and software installers.</p>
<p>This open-source software is not available from official repositories and needs to be retrieved as a <strong>PPA</strong> and then installed.</p>
<div class="notice-note">
<div class="note-icon-wrapper"><i class="fa fa-lightbulb"></i></div>
<div class="notice-text">
<p><strong>Note:</strong> The Personal Package Archives <strong><code>(PPA)</code></strong> is a specialized software repository intended for non-standard software and software updates.</p>
</div>
</div>
<p>Enter the following command in your terminal to add the Ubuntu Cleaner PPA:</p>
<pre class="wp-block-code"><code>sudo add-apt-repository ppa:gerardpuig/ppa</code></pre>
<p>After adding the PPA, install Ubuntu Cleaner:</p>
<pre class="wp-block-code"><code>sudo apt install ubuntu-cleaner -y</code></pre>
<p>Once the installations process runs its course, type the following command to access Ubuntu Cleaner:</p>
<pre class="wp-block-code"><code>sudo ubuntu-cleaner</code></pre>
<p>Use the Ubuntu Cleaner graphical interface to remove the old kernels:</p>
<ol>
<li>Check the <strong>Old Kernel</strong> box.</li>
<li>Select the kernels you want to remove completely.</li>
<li>Click the <strong>Clean button</strong>.</li>
</ol>
<div class="wp-block-image"><noscript><img decoding="async" width="800" height="469" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072453295.png" alt="Location of the options necessary to remove old kernels with the Ubuntu Cleaner." class="wp-image-92575" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/ubuntu-cleaner-remove-old-kernel.png"/></noscript><img decoding="async" width="800" height="469" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072453295.png" alt="Location of the options necessary to remove old kernels with the Ubuntu Cleaner." class="wp-image-92575 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/ubuntu-cleaner-remove-old-kernel.png"/><noscript><noscript><img decoding="async" width="800" height="469" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072453295.png" alt="Location of the options necessary to remove old kernels with the Ubuntu Cleaner." class="wp-image-92575"/></noscript><img decoding="async" width="800" height="469" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072453295.png" alt="Location of the options necessary to remove old kernels with the Ubuntu Cleaner." class="wp-image-92575 j-lazy"/></noscript></div>
<ol start="4">
<li>The Ubuntu Cleaner tool might inform you that other changes are necessary to complete the process. Click <strong>Continue</strong> if you agree.</li>
</ol>
<div class="wp-block-image"><noscript><img decoding="async" width="800" height="399" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072454420.png" alt="Ubuntu Cleaner informs you that additional packages need to be removed before proceeding." class="wp-image-92576" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/additional-changes-ubuntu-cleaner-remove-old-kernel.png"/></noscript><img decoding="async" width="800" height="399" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072454420.png" alt="Ubuntu Cleaner informs you that additional packages need to be removed before proceeding." class="wp-image-92576 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/additional-changes-ubuntu-cleaner-remove-old-kernel.png"/><noscript><noscript><img decoding="async" width="800" height="399" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072454420.png" alt="Ubuntu Cleaner informs you that additional packages need to be removed before proceeding." class="wp-image-92576"/></noscript><img decoding="async" width="800" height="399" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072454420.png" alt="Ubuntu Cleaner informs you that additional packages need to be removed before proceeding." class="wp-image-92576 j-lazy"/></noscript></div>
<ol start="5">
<li>The old kernel removal process is now in progress.</li>
</ol>
<div class="wp-block-image"><noscript><img decoding="async" width="800" height="439" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072456891.png" alt="A progress bar infroms you how quickly the kernel removal is proceeding." class="wp-image-92577" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/removing-packages-ubuntu-cleaner-progress-bar.png"/></noscript><img decoding="async" width="800" height="439" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072456891.png" alt="A progress bar infroms you how quickly the kernel removal is proceeding." class="wp-image-92577 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/removing-packages-ubuntu-cleaner-progress-bar.png"/><noscript><noscript><img decoding="async" width="800" height="439" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072456891.png" alt="A progress bar infroms you how quickly the kernel removal is proceeding." class="wp-image-92577"/></noscript><img decoding="async" width="800" height="439" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072456891.png" alt="A progress bar infroms you how quickly the kernel removal is proceeding." class="wp-image-92577 j-lazy"/></noscript></div>
<ol start="6">
<li>Once the process is complete, you receive the <em>Cool! Your system is clean!</em> message as confirmation.</li>
</ol>
<div class="wp-block-image"><noscript><img decoding="async" width="800" height="344" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072458353.png" alt="Ubuntu Cleaner informs you that the system has been cleaned." class="wp-image-92578" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/system-is-clean-message-ubuntu-cleaner-remove-old-kernel.png"/></noscript><img decoding="async" width="800" height="344" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072458353.png" alt="Ubuntu Cleaner informs you that the system has been cleaned." class="wp-image-92578 j-lazy" data-lazy-src="https://phoenixnap.com/kb/wp-content/uploads/2021/04/system-is-clean-message-ubuntu-cleaner-remove-old-kernel.png"/><noscript><noscript><img decoding="async" width="800" height="344" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072458353.png" alt="Ubuntu Cleaner informs you that the system has been cleaned." class="wp-image-92578"/></noscript><img decoding="async" width="800" height="344" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072458353.png" alt="Ubuntu Cleaner informs you that the system has been cleaned." class="wp-image-92578 j-lazy"/></noscript></div>
<h2 class="ftwp-heading" id="ftoc-heading-8">How to Delete Old Unused Kernels in Ubuntu 16.04 and Older</h2>
<p>By default, previous Linux versions didn’t include tools to manage old kernels.</p>
<p>1. To remove old Linux kernels, you first need to <strong>install the</strong> <strong>byobu tool</strong>:</p>
<pre class="wp-block-code"><code>sudo apt-get install byobu</code></pre>
<p>2. Then, run<strong> the utility</strong> by entering the following:</p>
<pre class="wp-block-code"><code>sudo purge-old-kernels</code></pre>
<p>The utility scans your system and removes all but the latest two kernels. If you want to keep more than the default two, use the <strong><code>––keep</code></strong> option:</p>
<pre class="wp-block-code"><code>sudo purge-old-kernels ––keep 3 –qy</code></pre>
<p>For more information on the <strong>byobu tool</strong>, enter the following:</p>
<pre class="wp-block-code"><code>man purge-old-kernels</code></pre>
<div class="notice-note">
<div class="note-icon-wrapper"><i class="fa fa-lightbulb"></i></div>
<div class="notice-text">
<p><strong>Note:</strong> Do not remove the current Linux kernel in use. Doing so could render your system unable to boot.  Use the <strong><code>uname -r</code></strong> command if you need your current kernel version.</p>
</div>
</div>
<h3 class="ftwp-heading" id="ftoc-heading-9">Remove Old Kernels Using Ubuntu Software Center</h3>
<p>In older <a href="https://phoenixnap.com/kb/how-to-check-ubuntu-version" target="_blank" rel="noreferrer noopener">versions of Ubuntu</a>, you can remove kernels manually using the Software Center. This option only works if you’re running a graphical interface (GUI).</p>
<p>1. Open the <strong>Ubuntu Software Center</strong>.</p>
<p>2. Enable the search bar and search for <strong><em>linux-image</em></strong>.</p>
<p>3. In the lower-left corner, you should see a hyperlink for <strong>Show xx technical items</strong>. Click this link to display the list of Linux kernels.</p>
<p>4. Refer back to your current kernel, which needs to remain on the system. Select any of the older versions and click the <strong>Remove</strong> button.</p>
<p>5. <strong>Refresh the GRUB (boot) menu</strong> by entering the following into a terminal window:</p>
<pre class="wp-block-code"><code>sudo update-grub</code></pre>
<p>Leave at least one previous kernel on your system. Your system was proven to be stable with that kernel. If you have difficulties after a software update, you can revert to the previous (working) Linux kernel.</p>
<div class="notice-note">
<div class="note-icon-wrapper"><i class="fa fa-lightbulb"></i></div>
<div class="notice-text">
<p><strong>Note:</strong> If you ever encounter a boot failure, visit our guide <a href="https://phoenixnap.com/kb/grub-rescue" target="_blank" rel="noopener">How to Use Grub Rescue to Fix Linux Boot Failure</a>.</p>
</div>
</div>
<p class="h3">Conclusion</p>
<p>You should now know several methods to remove old kernels from Ubuntu 19.04, 18.04, &amp; 16.04 or older. Purging kernels can help you recover wasted <a href="https://phoenixnap.com/kb/linux-check-disk-space" target="_blank" rel="noreferrer noopener">disk space in linux</a>. It’s also considered a best practice for good system hygiene, to prune out old files and dependencies.</p>
<div class="entry-readmore"><div class="entry-readmore-btn"></div></div>                                                        <div class="entry-copyright"><p>原创文章，作者：bd101bd101，如若转载，请注明出处：https://blog.ytso.com/tech/aiops/224154.html</p></div>                        </div>

                        <div class="entry-tag"></div>
                        <div class="entry-action">
                            <div class="btn-zan" data-id="224154"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up-fill"></use></svg></i> 赞 <span class="entry-action-num">(0)</span></div>
                                                    </div>

                        <div class="entry-bar">
                            <div class="entry-bar-inner">
                                                                <div class="entry-bar-info entry-bar-info2">
                                    <div class="info-item meta">
                                                                                    <a class="meta-item j-heart" href="javascript:;" data-id="224154"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i> <span class="data">0</span></a>                                        <a class="meta-item" href="#comments"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i> <span class="data">0</span></a>                                                                            </div>
                                    <div class="info-item share">
                                                                                    <a class="meta-item mobile j-mobile-share" href="javascript:;" data-id="224154" data-qrcode="https://blog.ytso.com/tech/aiops/224154.html">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-share"></use></svg></i> 生成海报                                            </a>
                                                                                    <a class="meta-item wechat" data-share="wechat" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-wechat"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item weibo" data-share="weibo" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-weibo"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item qq" data-share="qq" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qq"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item qzone" data-share="qzone" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qzone"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item douban" data-share="douban" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-douban"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item linkedin" data-share="linkedin" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-linkedin"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item facebook" data-share="facebook" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-facebook"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item twitter" data-share="twitter" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-twitter"></use></svg></i>                                            </a>
                                                                            </div>
                                    <div class="info-item act">
                                        <a href="javascript:;" id="j-reading"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-article"></use></svg></i></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                                            <div class="entry-page">
                    <div class="entry-page-prev j-lazy" style="background-image: url('https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png');" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107072425524.png">
                <a href="https://blog.ytso.com/tech/aiops/224153.html" title="Tmux Tutorial: How to Install and Use with Command Examples" rel="prev">
                    <span>Tmux Tutorial: How to Install and Use with Command Examples</span>
                </a>
                <div class="entry-page-info">
                    <span class="pull-left"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-left-double"></use></svg></i> 上一篇</span>
                    <span class="pull-right">2022年1月7日 07:21</span>
                </div>
            </div>
                            <div class="entry-page-next j-lazy" style="background-image: url('https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png');" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/01/06/20220107074338561.png">
                <a href="https://blog.ytso.com/tech/aiops/224160.html" title="How to Install SQL Workbench for PostgreSQL" rel="next">
                    <span>How to Install SQL Workbench for PostgreSQL</span>
                </a>
                <div class="entry-page-info">
                    <span class="pull-right">下一篇 <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-double"></use></svg></i></span>
                    <span class="pull-left">2022年1月7日 07:41</span>
                </div>
            </div>
            </div>
                                                                <div class="entry-related-posts">
                            <h3 class="entry-related-title">相关推荐</h3><ul class="entry-related cols-3 post-loop post-loop-list"><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/242100.html" target="_blank" rel="bookmark">
        <span>JavaScript数组详解与14种操作方法</span>
    </a>
    <span class="date">2022年4月7日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/182829.html" target="_blank" rel="bookmark">
        <span>安装及调用Matlab程序可能存在的问题解决办法</span>
    </a>
    <span class="date">2021年11月1日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/248797.html" target="_blank" rel="bookmark">
        <span>淘宝售前咨询规范考试题：小刘是一家天猫店铺的客服，有一位消费者拍下了一双现货高跟鞋</span>
    </a>
    <span class="date">2022年4月22日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/58156.html" target="_blank" rel="bookmark">
        <span>几种内部攻击和渗透的测试方法</span>
    </a>
    <span class="date">2021年8月9日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/199696.html" target="_blank" rel="bookmark">
        <span>集群管理工具ansible常用命令有哪些</span>
    </a>
    <span class="date">2021年11月20日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/6405.html" target="_blank" rel="bookmark">
        <span>No write since last change (add ! to override)详解程序员</span>
    </a>
    <span class="date">2021年7月16日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/249760.html" target="_blank" rel="bookmark">
        <span>百度云加速525状态码原因分析</span>
    </a>
    <span class="date">2022年4月23日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/55041.html" target="_blank" rel="bookmark">
        <span>网卡厂商自动识别工具（Python版， 附源代码）</span>
    </a>
    <span class="date">2021年8月7日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/2675.html" target="_blank" rel="bookmark">
        <span>ubuntu qq详解程序员</span>
    </a>
    <span class="date">2021年7月16日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/56334.html" target="_blank" rel="bookmark">
        <span>url 中 # ? &#038; 的作用</span>
    </a>
    <span class="date">2021年8月7日</span>
</li></ul>                        </div>
                    
<div id="comments" class="entry-comments">
    	<div id="respond" class="comment-respond">
		<h3 id="reply-title" class="comment-reply-title">发表回复 <small><a rel="nofollow" id="cancel-comment-reply-link" href="/tech/aiops/224154.html#respond" style="display:none;"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-close"></use></svg></i></a></small></h3><div class="comment-form"><div class="comment-must-login">请登录后评论...</div><div class="form-submit"><div class="form-submit-text pull-left"><a href="https://blog.ytso.com/login">登录</a>后才能评论</div> <button name="submit" type="submit" id="must-submit" class="wpcom-btn btn-primary btn-xs submit">提交</button></div></div>	</div><!-- #respond -->
		</div><!-- .comments-area -->
                </article>
                    </main>
        <error>
    <code>wp_die</code>
    <title><![CDATA[WordPress &amp;rsaquo; Error]]></title>
    <message><![CDATA[&lt;h1&gt;Error establishing a Redis connection&lt;/h1&gt;
&lt;p&gt;To disable Redis, delete the &lt;code&gt;object-cache.php&lt;/code&gt; file in the &lt;code&gt;/wp-content/&lt;/code&gt; directory.&lt;/p&gt;
]]></message>
    <data>
        <status>500</status>
    </data>
</error>
<!--
Performance optimized by Redis Object Cache. Learn more: https://wprediscache.com

Retrieved 2210 objects (469 KB) from Redis using Predis (v2.4.0).
-->
