5
如何清理/boot分区下的内容?
source link: http://sunqi.site/2021/11/06/%E5%A6%82%E4%BD%95%E6%B8%85%E7%90%86-boot%E5%88%86%E5%8C%BA%E4%B8%8B%E7%9A%84%E5%86%85%E5%AE%B9/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
如何清理/boot分区下的内容?
字数统计: 211字
| 阅读时长≈ 1分
CentOS运行时间长了,随着系统更新,/boot分区空间会越来越小,因为存留低版本内核相关文件没有得到及时清理,所以需要手动进行清理,但是由于内核文件重要性,如果清理方法不当就会导致系统无法启动。
查询已经安装内核
首先查询一下已经安装的内核信息。
rpm -q kernel
例如得到如下列表:
kernel-3.10.0-862.el7.x86_64
kernel-3.10.0-1062.4.3.el7.x86_64
kernel-3.10.0-1062.9.1.el7.x86_64
查询正在使用的内核
uname -a
例如得到如下信息:
Linux compute201 3.10.0-1062.4.3.el7.x86_64 #1 SMP Wed Nov 13 23:58:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
删除无用的内核
rpm -e kernel-3.10.0-862.el7.x86_64
rpm -e kernel-3.10.0-1062.9.1.el7.x86_64
- 本文作者: 孙琦(Ray)
- 本文链接: http://sunqi.site/2021/11/06/如何清理-boot分区下的内容/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!
扫一扫,分享到微信
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK