Para limpar o kernel antigo, você pode usar a ferramenta de linha de comando purge-old-kernels
.
This program will remove old kernel and header packages from the system, freeing disk space. It will never remove the currently running kernel. By default, it will keep at least the latest 2 kernels, but the user can override that value using the --keep parameter. Any additional parameters will be passed directly to
apt-get
Para instalar purge-old-kernels
, execute:
sudo apt install byobu
ou
sudo apt install bikeshed
Para manter a última execução do kernel n
:
sudo purge-old-kernels --keep n
e, g: n = 2
sudo purge-old-kernels --keep 2
Atualizar grub
:
sudo update-grub