How-To Geek

How To Hide Kernel Updates in Ubuntu

Ubuntu’s Update Manager is a great utility that keeps all of your software up-to-date. If you’re using the default sources, updates have been tested and should work with no problems.

However, one item that you may not want to upgrade is the Linux kernel that powers your computer. Maybe you’ve customized your kernel, are annoyed with constantly cleaning up your Grub boot menu, or have had issues with video and audio drivers not working after kernel updates.

The following steps will show you how to hide kernel upgrades in Ubuntu while still allowing you to use Update Manager to get other software updates.


APT (Advanced Packaging Tool) is the system that Ubuntu uses to manage all of the software installed on a system. It allows you to “pin” a package to a certain version, so that it won’t be updated when you the Update Manager runs.

To pin your kernel packages, first you must determine what version your kernel is. One way to do this is to open the Synaptic Package Manager in System > Administration.


Type in “linux-generic” in the Quick search text field and hit enter.


Make a note of the number listed in the “Installed Version” column. We’ll use it in the next step.

Next, we need to edit the file /etc/apt/preferences. Open it by pressing Alt+F2 to bring up the Run Application window and entering in:

gksudo gedit /etc/apt/preferences


This will open up a gedit window. Most likely the window will be blank, unless you’ve played around with APT before.

In the window, type in the following, replacing the version number with the version number you found in the Synaptic Package Manager.

Package: linux-generic linux-headers-generic linux-image-generic linux-restricted-modules-generic
Pin: version <insert version here>
Pin-Priority: 1001


Save the file and close gedit. If you open the Update Manager, you should see that the Linux kernel updates are now hidden!


And that’s it!

Note: Make sure that you update your kernel every now and then, as even Linux suffers security issues occasionally.

Trevor is our resident Linux geek, but always keeps his eyes open for neat Windows tricks too.

  • Published 02/12/10

Comments (8)

  1. matthewguay

    Nice tip … thanks! This would be especially useful for Linux installs in Virtual PC, as kernal updates often render them useless. Since that’s the only way I run Linux (well, that and in VMware), this is really useful.

  2. Michael Mior

    You could also just go to the Package menu in Synpatic and select Lock Version to save the extra steps. I believe this will have the same effect.

  3. Trevor Bekolay

    Hey Michael, thanks for the tip! I just tried it; I can’t say for sure that it works, as my kernel is up to date, but I don’t see why it wouldn’t work.

    It didn’t modify anything in /etc/apt that I could see though, so the steps on the post might be a bit more foolproof.

  4. abdelraouf

    how to download any of your geek articles shall i go to my browser to look for or you have a recommended download site
    thanks a lot for your update and valuable informations

  5. Trevor Bekolay


    If you want to download a copy of one of the articles on How-To Geek, I would recommend printing this page to a PDF. We have a guide for Windows, or if you’re on Ubuntu I think it’s built in (print to file).

  6. Santo

    Does the same steps work if I want to disable updating a particular application?

  7. Trevor Bekolay


    Yes, the same steps will work for any package. You would just modify the line “Package: ” to be the package you want to pin.

    You can have multiple entries in the /etc/apt/preferences file. Each entry should be separated by a blank line.

    Check out section 3.10 of this document for more info.

  8. Santo


    Thanks. It worked and I was able to hide the update.

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!