1.显示系统全部内核
dpkg --get-selections | grep linux
2.完全删除系统内核
sudo apt-get remove --purge linux-modules-5.4.0-42-generic
3.再次用以下命令查看是否删除干净
dpkg --get-selections | grep linux
dpkg --get-selections | grep linux
sudo apt-get remove --purge linux-modules-5.4.0-42-generic
dpkg --get-selections | grep linux