{"id":5952,"date":"2024-11-28T18:39:41","date_gmt":"2024-11-28T13:09:41","guid":{"rendered":"https:\/\/www.veeble.com\/kb\/?p=5952"},"modified":"2025-04-03T11:18:12","modified_gmt":"2025-04-03T05:48:12","slug":"how-to-prevent-kernel-updates-in-ubuntu","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/how-to-prevent-kernel-updates-in-ubuntu\/","title":{"rendered":"How to Prevent Kernel Updates in Ubuntu"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"594\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu-1024x594.jpg\" alt=\"How to Prevent Kernel Updates in Ubuntu\n\" class=\"wp-image-5962\" style=\"width:767px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu-1024x594.jpg 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu-300x174.jpg 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu-768x445.jpg 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu-1536x890.jpg 1536w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>In<a href=\"https:\/\/www.veeble.com\/in\/vps-hosting\/\"> Linux server<\/a>, the kernel is a critical part of the operating system that directly interacts with the hardware and manages system resources. While regular kernel updates help ensure better security, performance, and compatibility, some administrators may prefer to prevent automatic kernel updates, especially in production environments, to avoid potential issues with new kernel versions. This article will guide you through the process of preventing kernel updates in Ubuntu.<\/p>\n\n\n\t\t\t\t<div class=\"wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-69563ba4      \"\n\t\t\t\t\tdata-scroll= \"1\"\n\t\t\t\t\tdata-offset= \"30\"\n\t\t\t\t\tstyle=\"\"\n\t\t\t\t>\n\t\t\t\t<div class=\"uagb-toc__wrap\">\n\t\t\t\t\t\t<div class=\"uagb-toc__title\">\n\t\t\t\t\t\t\tTable Of Contents\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uagb-toc__list-wrap \">\n\t\t\t\t\t\t<ol class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#why-prevent-kernel-updates\" class=\"uagb-toc-link__trigger\">Why Prevent Kernel Updates?<\/a><li class=\"uagb-toc__list\"><a href=\"#prerequisites\" class=\"uagb-toc-link__trigger\">Prerequisites<\/a><li class=\"uagb-toc__list\"><a href=\"#how-to-prevent-kernel-update\" class=\"uagb-toc-link__trigger\">How to prevent kernel update?<\/a><ul class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#check-the-current-kernel-version\" class=\"uagb-toc-link__trigger\">Check the current kernel version<\/a><li class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#identify-the-installed-kernel-package\" class=\"uagb-toc-link__trigger\">Identify the Installed Kernel Package<\/a><li class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#hold-the-kernel-package\" class=\"uagb-toc-link__trigger\">Hold the Kernel Package<\/a><\/li><\/ul><\/li><li class=\"uagb-toc__list\"><a href=\"#verify-the-hold-status\" class=\"uagb-toc-link__trigger\">Verify the Hold Status<\/a><li class=\"uagb-toc__list\"><a href=\"#how-to-release-the-hold-of-kernel-packages\" class=\"uagb-toc-link__trigger\">How to Release the hold of Kernel packages?<\/a><li class=\"uagb-toc__list\"><a href=\"#conclusion\" class=\"uagb-toc-link__trigger\">Conclusion<\/a><ul class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#reliable-hosting-solutions\" class=\"uagb-toc-link__trigger\">Reliable Hosting Solutions<\/a><\/ul><\/ul><\/ol>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\n\n<p><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"why-prevent-kernel-updates\"><strong>Why Prevent Kernel Updates?<\/strong> <\/h2>\n\n\n<p>There are several reasons why you might want to stop kernel updates:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Stability:<\/strong> New kernel versions might introduce changes that could potentially break compatibility with existing software or hardware.<\/li>\n\n\n\n<li><strong>Customization:<\/strong> If you have customized your kernel or have specific modules, you might not want updates to overwrite your changes.<\/li>\n\n\n\n<li><strong>Testing:<\/strong> In testing environments, you might want to control which kernel version is used to ensure the accuracy of your testing results.<\/li>\n\n\n\n<li><strong>Production Systems:<\/strong> For production systems, maintaining the same kernel version helps avoid unexpected disruptions caused by kernel changes.<\/li>\n<\/ol>\n\n\n<h2 class=\"wp-block-heading\" id=\"prerequisites\"><strong>Prerequisites<\/strong><\/h2>\n\n\n<ol class=\"wp-block-list\">\n<li>A running Ubuntu system.<\/li>\n\n\n\n<li>Root or sudo privileges.<\/li>\n<\/ol>\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-prevent-kernel-update\">How to prevent kernel update?<\/h2>\n\n\n<p>In <a href=\"https:\/\/www.veeble.com\/kb\/how-to-update-linux-kernel-in-ubuntu\/\">previous article<\/a>, we have discussed about how to update linux kernel in Ubuntu. Now we can check how to prevent the kernel update. <\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"check-the-current-kernel-version\">Check the current kernel version<\/h3>\n\n\n<p>Before stopping the kernel update, you have to check the current kernel version.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>uname -r<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"88\" src=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/image-11.png\" alt=\"\" class=\"wp-image-5953\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/image-11.png 901w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/image-11-300x29.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/image-11-768x75.png 768w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><\/a><\/figure>\n\n\n<h3 class=\"wp-block-heading\" id=\"identify-the-installed-kernel-package\"><strong>Identify the Installed Kernel Package<\/strong> <\/h3>\n\n\n<p>First, you need to identify the exact name of the kernel package that you want to hold. You can list all installed kernel packages using the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dpkg --list | grep linux-image<\/code><\/pre>\n\n\n\n<p>This will show a list of installed kernel packages, such as <code>linux-image-5.4.0-91-generic<\/code><\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"hold-the-kernel-package\">Hold the Kernel Package<\/h3>\n\n\n<p>Use the <code>apt-mark<\/code> command to prevent the specific kernel package from being updated. Replace <code>&lt;kernel-package&gt;<\/code> with the name of the kernel package you want to hold.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-mark hold &lt;kernel-package name&gt;<\/code><\/pre>\n\n\n\n<p>For example, if you want to hold the <code>linux-image-5.4.0-91-generic<\/code> package:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-mark hold linux-image-5.4.0-91-generic<\/pre>\n\n\n<h2 class=\"wp-block-heading\" id=\"Verify-the-Hold-Status-\"><strong>Verify the Hold Status<\/strong> <\/h2>\n\n\n<p>You can verify that the kernel package is held by using the <code>apt-mark<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-mark showhold<\/code><\/pre>\n\n\n\n<p>This will list all packages that are held, including the kernel package.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-release-the-hold-of-kernel-packages\">How to Release the hold of Kernel packages?<\/h2>\n\n\n<p>If you later decide to allow updates to the kernel package, you can remove the hold by running the given command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-mark unhold &lt;kernel-package name&gt;<\/code><\/pre>\n\n\n\n<p>You can verify the unhold using the above <a href=\"#Verify-the-Hold-Status-\">command <\/a>.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion <\/h2>\n\n\n<p>By following the methods outlined in this article, you can prevent kernel updates in Ubuntu. These techniques allow you to maintain control over the kernel version in your environment. However, it\u2019s important to regularly check for security patches for the kernel, as neglecting updates can expose your system to vulnerabilities.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-a4d75465 wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Reliable Hosting Solutions<\/h3><p class=\"uagb-cta__desc\">Trust in our dependable cPanel hosting. We provide a stable and secure environment for your website, ensuring minimal downtime. Enjoy peace of mind with our expert support.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/cpanel-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Get Fast Hosting<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"has-ast-global-color-8-color has-text-color has-link-color wp-elements-c2d556d0ee878369f9daad5ed37a80fa\"><strong>Also Reads: <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-veeble-hosting wp-block-embed-veeble-hosting\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"mFNlmEHI0l\"><a href=\"https:\/\/www.veeble.com\/kb\/how-to-update-linux-kernel-in-ubuntu\/\">How to Update Linux Kernel in Ubuntu?<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;How to Update Linux Kernel in Ubuntu?&#8221; &#8212; Veeble Hosting\" src=\"https:\/\/www.veeble.com\/kb\/how-to-update-linux-kernel-in-ubuntu\/embed\/#?secret=7udwNWrT0k#?secret=mFNlmEHI0l\" data-secret=\"mFNlmEHI0l\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-veeble-hosting wp-block-embed-veeble-hosting\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"ErIVoQtDfX\"><a href=\"https:\/\/www.veeble.com\/kb\/tune-linux-kernel-without-reboot\/\">How to Tune Linux Kernel without Reboot<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;How to Tune Linux Kernel without Reboot&#8221; &#8212; Veeble Hosting\" src=\"https:\/\/www.veeble.com\/kb\/tune-linux-kernel-without-reboot\/embed\/#?secret=d9B6Rxy18t#?secret=ErIVoQtDfX\" data-secret=\"ErIVoQtDfX\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In Linux server, the kernel is a critical part of the operating system that directly interacts with the hardware and manages system resources. While [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":5962,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5],"tags":[],"class_list":["post-5952","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu.jpg",2048,1187,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu-300x174.jpg",300,174,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu-768x445.jpg",768,445,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu-1024x594.jpg",1024,594,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu-1536x890.jpg",1536,890,true],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Prevent-Kernel-Updates-in-Ubuntu.jpg",2048,1187,false]},"uagb_author_info":{"display_name":"Nayana Nair","author_link":"https:\/\/www.veeble.com\/kb\/author\/nayana\/"},"uagb_comment_info":0,"uagb_excerpt":"In Linux server, the kernel is a critical part of the operating system that directly interacts with the hardware and manages system resources. While [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/5952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=5952"}],"version-history":[{"count":9,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/5952\/revisions"}],"predecessor-version":[{"id":8244,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/5952\/revisions\/8244"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/5962"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=5952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=5952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=5952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}