F
F
fpir2019-04-15 10:39:24
linux
fpir, 2019-04-15 10:39:24

How to remove the latest kernel in Ubuntu?

I updated the system via apt-get dist-upgrade and either the kernel got crooked, or a conflict, in general, when the kernel is loaded, it falls into kernel panic. Everything is fine with the previous kernels. In order to load the old kernel, you can change the boot order, but then there will be an indication either to a specific kernel, or to a kernel in a row, which will require one more intervention. The kernel can be removed, but apt-get remove will install the last kernel to be removed.
Question: how to properly remove the latest kernel?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
F
fpir, 2019-04-16
@fpir

As a result, it was correctly removed through dpkg and subsequent apt autoremove.

R
Ronald McDonald, 2019-04-15
@Zoominger

Do it:
you will see a list of cores. Copy the version of the newest one (the cat must be deleted) and:

apt-get remove linux-image-<версия> linux-image-extra-<версия> linux-headers-<версия>

P
pfg21, 2019-04-15
@pfg21

install the old / desired kernel manually and prohibit updating it.
$ apt-mark --help
apt 1.6.10 (i386)
Usage: apt-mark [options] {auto|manual} package1 [package2 ...]
apt-mark is a simple command-line program for marking packages as manually or automatically installed . Can also be used to change the package selection state of dpkg(1) and display a list of packages with or without a specific label.
Basic commands:
auto - mark the specified packages as installed automatically
manual - mark the specified packages as manually installed
unhold - unmark the package as fixed
showauto - Display a list of automatically installed packages
showmanual - Display a list of manually installed packages showhold -
Display a list of fixed packages

I
Ivan Suslin, 2021-06-16
@iwansuslin

Best option:
1- Boot must be from a non-removable kernel!!!
So:
2- ls /boot/ - Get a list of kernels
3- Administration-> Synaptec package manager - remove the last kernel (or any other, besides the one you booted from)
4- Krusader - check the remaining folder
Find the / lib / modules / folder , mark the folders with remote kernels and use F8 to delete them.
5- purge-old-kernels - automatic garbage cleanup
Well, to finish, enter the bootloader update command
6- sudo update-grub2 - update the bootloader configuration
Everything!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question