定位
定位
df -h /boot
uname -r # 当前运行内核,不能删
ls /boot/vmlinuz-* # 已安装内核列表清理(dnf 系)
清理(dnf 系)
dnf repoquery --installonly --latest-limit=-2 -q # 列出可清理的旧内核
# 确认列表不含 uname -r 后执行:
dnf remove -y $(dnf repoquery --installonly --latest-limit=-2 -q)
df -h /bootUOS/Debian 系用 apt autoremove --purge 清理旧内核;保留至少 1-2 个旧内核作为退路。