As always in Linux there are several solutions to the same problem.
In this small article I will show you how you can remove old kernels in Linux Mint in various ways.
You can remove the old core system with a single command in the Terminal. You need to do the following:
and then run:
sudo apt purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | head -n -1)
sudo apt autoremove && sudo update-grub
You can use the excellent Synaptic package manager. Run the program, click the Search button and enter query - linux-image
Now we need to sort the list by the first column. To do this, click on the first column, thus first appeared on the list of installed packages that will be highlighted in green.
I recommend to keep the latest and previous version of the kernel, and all the rest can be safely deleted. To do this select the old versions of packages linux-image-X. X. x-generic, linux-headers-X. X. x, linux-headers-X. X. x-generic, clicking with the right mouse button and selecting “Mark for complete removal”, and then click Apply.
The system grub will be updated automatically.
May the Force be with you,