How to remove 'bad' kernels from Ubuntu 17.10

Ubuntu 17.10

Ubuntu 17.10 has had serious problems with the kernels, a problem that has meant that Lenovo computers do not have Ubuntu 17.10, that users see their computers slow down due to a bug with the processors or that virtualbox stops working.

You may already have the problems solved, but you have to remember that those kernels are still there and can screw us.

To solve this I propose a kernel cleaning, but not just any kind of cleaning. A sensible and healthy cleaning.

First of all, what we will do is update Ubuntu 17.10, since updates may have a kernel version. To do this we open the terminal and write the following:

sudo apt-get update<span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start"></span>
sudo apt-get upgrade

After several minutes, Ubuntu 17.10 will be up to date (if we really had updates); now we have to restart the computer.

Once we have restarted the computer, we have to check which kernel we are using. For this we will use the command "Uname -r" In the terminal.

And now we have to know that kernel versions we have in our Ubuntu 17.10. To do this in a terminal we write the following:

dpkg --list | grep linux-image

This will show us a list with all the kernels we have. We have to remove all kernels older than the kernel we use. It is always recommended to leave at least two versions of the kernel, but since the Ubuntu 17.10 base kernel has given problems, in this case we will only leave the current one. To eliminate the kernel we have to write the following in the terminal:

sudo apt-get purge NOMBRE-KERNEL

EYE!! Don't remove the kernel we are using. And when we finish removing all the kernels, we have to execute the following command:

sudo update-grub

With this not only we have freed up space rather, we will make sure that our Ubuntu does not reload a bad or faulty kernel.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Luis Javier said

    I use ukuu and it's perfect for me like this

  2.   buxxx said

    And a "sudo apt autoremove" is not easier. For some versions, the elimination of kernels has been introduced in this command.

  3.   Jorge Ariel Utello said

    The 17.10 passed without pain or glory

  4.   Edgar ubago said

    Good afternoon
    I was starting and typed the entire command but it threw a syntax error
    This Type:
    sudo apt-get update

    This threw me:
    bash: syntactic error near unexpected element `<'

    In addition to this, it does not allow me to install as the last update due to a series of repositories, I thank you if you can help me

    Thank you