ubuntu 清理boot目录

1.uname -r

4.4.0-121-generic

2.dpkg --get-selections|grep linux

console-setup-linux install
libselinux1:amd64 install
linux-base install
linux-firmware install
linux-generic install
linux-headers-4.4.0-104 purge
linux-headers-4.4.0-108 install
linux-headers-4.4.0-108-generic install
linux-headers-4.4.0-109 install
linux-headers-4.4.0-109-generic install
linux-headers-4.4.0-112 install
linux-headers-4.4.0-112-generic install
linux-headers-4.4.0-116 install
linux-headers-4.4.0-116-generic install
linux-headers-4.4.0-119 install
linux-headers-4.4.0-119-generic install
linux-headers-4.4.0-121 install
linux-headers-4.4.0-121-generic install
linux-headers-4.4.0-124 install
linux-headers-4.4.0-124-generic install
linux-headers-4.4.0-127 install
linux-headers-4.4.0-127-generic install
linux-headers-4.4.0-128 install
linux-headers-4.4.0-128-generic install
linux-headers-4.4.0-130 install
linux-headers-4.4.0-130-generic install
linux-headers-4.4.0-87 install
linux-headers-4.4.0-87-generic install
linux-headers-generic install
linux-image-4.4.0-116-generic install
linux-image-4.4.0-119-generic install
linux-image-4.4.0-121-generic install
linux-image-4.4.0-124-generic install
linux-image-4.4.0-127-generic install
linux-image-4.4.0-128-generic install
linux-image-extra-4.4.0-116-generic install
linux-image-extra-4.4.0-119-generic install
linux-image-extra-4.4.0-121-generic install
linux-image-extra-4.4.0-124-generic install
linux-image-extra-4.4.0-127-generic install
linux-image-extra-4.4.0-128-generic install
linux-image-extra-4.4.0-130-generic install
linux-image-extra-virtual install
linux-image-generic install
util-linux install

3.后边带版本号的是可以卸载的内核,与uname -r 结果对比,删除其他的版本的内核

4.删除之前/boot 目录必须有空间,如果空间为0,删除的命令不能执行,可以先移走一个文件,然后做软连接,清理其他的文件之后,还原回来,如果移走文件空间没有释放,需要重启服务器

5.sudo dpkg --purge [内核名称]

6.linux-image-extra 先删除,这个是依赖linux-image的

7.保留距离当前版本最近一个版本的内核

转载于:https://www.cnblogs.com/as278257357/p/9590431.html

发布了0 篇原创文章 · 获赞 4 · 访问量 5万+
展开阅读全文
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 编程工作室 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览