华域联盟 Linux 解决Ubuntu 16.04下提示boot分区空间不足的办法

解决Ubuntu 16.04下提示boot分区空间不足的办法

前言

因为linux内核一直在更新,更新后,旧的内核就不在使用,但旧的内核文件还在boot里面,占据着空间,更新几次过后boot分区就会被占满,显示boot磁盘空间不足。

解决办法

将不用的内核文件删除,释放空间。

步骤如下

一、查看已安装的内核dpkg --get-selections |grep linux-image

eason@eason:~$ dpkg --get-selections |grep linux-image
linux-image-4.4.0-21-generic deinstall
linux-image-4.4.0-57-generic install
linux-image-4.4.0-59-generic install
linux-image-4.4.0-62-generic install
linux-image-4.4.0-64-generic install
linux-image-extra-4.4.0-21-generic deinstall
linux-image-extra-4.4.0-57-generic install
linux-image-extra-4.4.0-59-generic install
linux-image-extra-4.4.0-62-generic install
linux-image-extra-4.4.0-64-generic install
linux-image-extra-virtual install
linux-image-generic install
eason@eason:~$

后面带deinstall的为已删除的内核,可以忽略

二、使用uname -a查看自己当前启动的是哪个内核

eason@eason:~$ uname -a
Linux eason 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

从输出可知我们当前启动的内核是4.4.0-62-generic

三、运行apt-get remove命令卸载其他内核,为了保险起见,保留最近的一两个版本。

sudo apt-get remove linux-image-4.4.0-57-generic
sudo apt-get remove linux-image-4.4.0-59-generic
sudo apt-get remove linux-image-extra-4.4.0-57-generic
sudo apt-get remove linux-image-extra-4.4.0-59-generic

如提示有未卸载干净的可以执行sudo apt-get remove来卸载。

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流。

您可能感兴趣的文章:

本文由 华域联盟 原创撰写:华域联盟 » 解决Ubuntu 16.04下提示boot分区空间不足的办法

转载请保留出处和原文链接:https://www.cnhackhy.com/59115.htm

本文来自网络,不代表华域联盟立场,转载请注明出处。

作者: sterben

发表回复

联系我们

联系我们

2551209778

在线咨询: QQ交谈

邮箱: [email protected]

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部