首先列出当前已安装的内核
dpkg --get-selections| grep linux
比如要卸载linux5.1.9 则执行命令:
sudo apt remove --purge linux-headers-5.1.9-050109
除了linux-header,还需要卸载linux-modules和linux-image-unsigned
命令:
sudo apt remove --purge linux-modules-5.1.9-050109-generic
这样就把5.1.9内核卸载掉了.