查看已安装内核:

dpkg -l | grep linux-image | awk '{print$2}'

一键删除未使用内核:

apt -y remove --purge $(dpkg -l | grep linux-image | awk '{print$2}' | grep -v $(uname -r)) 

重新查看一下内核:

dpkg -l | grep linux-image | awk '{print$2}'

没问题的话,更新引导系统并重启

update-grub
reboot
Last modification:March 21, 2023
If you think my article is useful to you, please feel free to appreciate