Results 1 to 5 of 5

Thread: How to uninstall a kernel?

Hybrid View

  1. #1
    Join Date
    Oct 2019
    Beans
    53

    How to uninstall a kernel?

    After updating today nvidia 390xx driver don't work. I have to boot to old kernel. How to uninstall this new kernel? Linux mb2 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue Mar 31 04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to uninstall a kernel?

    You need to know the full package name.

    Code:
    dpkg -l|grep linux-image-5.3
    Get the full, exact name, then use
    Code:
    sudo apt remove linux-image-5.3........
    to remove it.

  3. #3
    Join Date
    Oct 2019
    Beans
    53

    Re: How to uninstall a kernel?

    Did it, ty.

    Two more Qs.

    #1. How to configure things so that X number of kernels are saved? I want 5 or more kernels saved, due to me using 390xx drivers, and 390xx drivers lately have history of not working with new kernel releases.

    #2. How to lock my kernel? Why would I want to update it anyway, since I'm using circa 2010 laptop. Can I lock my kernel so that updates don't affect it?

  4. #4
    Join Date
    Jan 2008
    Beans
    164
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: How to uninstall a kernel?

    The rules for old kernel removal are stored in /etc/apt/apt.conf.d/01autoremove-kernels and generated by /etc/kernel/postinst.d/apt-auto-removal, so you could patch this bit of apt-auto-removal:

    Code:
    debkernels="$(echo "$latest_version
    $installed_version
    $running_version
    $previous_version" | sort -u | sed -e '/^$/ d')"
    to include extra kernels. Note that this file is a part of apt package and may be overwritten by its updates.

    To lock any package at a specific version use 'apt-mark hold <package-name>'. GUI package managers may have an option for that too e.g. Muon (KDE package manager) has a 'lock at current version' checkbox in a right-click context menu.

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to uninstall a kernel?

    Kernels have bugs. Some are minor, but many are huge security problems and allow remote take-over. if the machine is on a network, it needs to be patched. if a machine is on the internet, it needs to be patched weekly. That includes any new kernels.

    After you've been hacked, you'll agree.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •