标题: Ubuntu上删除boot分区中的无用kernel image [打印本页] 作者: 盛世宏图 时间: 2025-4-27 23:52 标题: Ubuntu上删除boot分区中的无用kernel image 一直使用VPS,今天心血来潮,想升级一下VPS上的ubuntu和kernel版本,但在升级过程中,碰到一个环境:VPS的boot分区太小,剩余空间不足,造成kernel upgrade时失败了。
The upgrade has aborted. The upgrade needs a total of 207 M free
space on disk '/boot'. Please free at least an additional 69.2 M of
disk space on '/boot'. You can remove old kernels using 'sudo apt
autoremove' and you could also set COMPRESS=xz in
/etc/initramfs-tools/initramfs.conf to reduce the size of your
initramfs.
按照上面提示,尝试把压缩选项从lz4改成了xz,但空间仍旧不够。仔细检查了下boot分区内的文件,发现以前老旧的kernel image占用了很大空间,遂尝试了下面的下令进行了删除,删除之后就可以正常升级kernel了。