Redhat
從 Redhat 引導分區解除安裝舊核心
接管了一個舊系統,發現
/boot
分區已滿 90%。在網上搜尋了一番後,我發現安裝了較舊的核心,佔用了磁碟空間。
做
rpm -qa | grep ^kernel | sort
節目:kernel-2.6.9-67.0.15.EL kernel-2.6.9-67.0.20.EL kernel-2.6.9-67.0.22.EL kernel-2.6.9-67.EL kernel-2.6.9-78.0.13.EL kernel-2.6.9-78.0.17.EL kernel-2.6.9-78.0.1.EL kernel-2.6.9-78.0.22.EL kernel-2.6.9-78.0.5.EL kernel-2.6.9-78.0.8.EL kernel-2.6.9-89.0.11.EL kernel-2.6.9-89.0.9.EL kernel-2.6.9-89.31.1.EL kernel-2.6.9-89.33.1.EL kernel-2.6.9-89.35.1.EL kernel-devel-2.6.9-67.0.15.EL kernel-devel-2.6.9-67.0.20.EL kernel-devel-2.6.9-67.0.22.EL kernel-devel-2.6.9-67.EL kernel-devel-2.6.9-78.0.13.EL kernel-devel-2.6.9-78.0.17.EL kernel-devel-2.6.9-78.0.1.EL kernel-devel-2.6.9-78.0.22.EL kernel-devel-2.6.9-78.0.5.EL kernel-devel-2.6.9-78.0.8.EL kernel-devel-2.6.9-89.0.11.EL kernel-devel-2.6.9-89.0.7.EL kernel-devel-2.6.9-89.0.9.EL kernel-devel-2.6.9-89.31.1.EL kernel-devel-2.6.9-89.33.1.EL kernel-devel-2.6.9-89.35.1.EL kernel-hugemem-devel-2.6.9-67.0.15.EL kernel-hugemem-devel-2.6.9-67.0.20.EL kernel-hugemem-devel-2.6.9-67.0.22.EL kernel-hugemem-devel-2.6.9-67.EL kernel-hugemem-devel-2.6.9-78.0.13.EL kernel-hugemem-devel-2.6.9-78.0.17.EL kernel-hugemem-devel-2.6.9-78.0.1.EL kernel-hugemem-devel-2.6.9-78.0.22.EL kernel-hugemem-devel-2.6.9-78.0.5.EL kernel-hugemem-devel-2.6.9-78.0.8.EL kernel-hugemem-devel-2.6.9-89.0.11.EL kernel-hugemem-devel-2.6.9-89.0.7.EL kernel-hugemem-devel-2.6.9-89.0.9.EL kernel-hugemem-devel-2.6.9-89.31.1.EL kernel-hugemem-devel-2.6.9-89.33.1.EL kernel-hugemem-devel-2.6.9-89.35.1.EL kernel-smp-2.6.9-67.0.15.EL kernel-smp-2.6.9-67.0.20.EL kernel-smp-2.6.9-67.0.22.EL kernel-smp-2.6.9-67.EL kernel-smp-2.6.9-78.0.13.EL kernel-smp-2.6.9-78.0.17.EL kernel-smp-2.6.9-78.0.1.EL kernel-smp-2.6.9-78.0.22.EL kernel-smp-2.6.9-78.0.5.EL kernel-smp-2.6.9-78.0.8.EL kernel-smp-2.6.9-89.0.11.EL kernel-smp-2.6.9-89.0.9.EL kernel-smp-2.6.9-89.31.1.EL kernel-smp-2.6.9-89.33.1.EL kernel-smp-2.6.9-89.35.1.EL kernel-smp-devel-2.6.9-67.0.15.EL kernel-smp-devel-2.6.9-67.0.20.EL kernel-smp-devel-2.6.9-67.0.22.EL kernel-smp-devel-2.6.9-67.EL kernel-smp-devel-2.6.9-78.0.13.EL kernel-smp-devel-2.6.9-78.0.17.EL kernel-smp-devel-2.6.9-78.0.1.EL kernel-smp-devel-2.6.9-78.0.22.EL kernel-smp-devel-2.6.9-78.0.5.EL kernel-smp-devel-2.6.9-78.0.8.EL kernel-smp-devel-2.6.9-89.0.11.EL kernel-smp-devel-2.6.9-89.0.7.EL kernel-smp-devel-2.6.9-89.0.9.EL kernel-smp-devel-2.6.9-89.31.1.EL kernel-smp-devel-2.6.9-89.33.1.EL kernel-smp-devel-2.6.9-89.35.1.EL kernel-utils-2.4-20.el4
我刪除/解除安裝舊核心似乎是一種共識,但作為非系統管理員,我不太確定如何執行此操作。我怎麼知道要解除安裝哪些,我應該用
rpm
它來解除安裝?
uname -a
顯示:
Linux 2.6.9-89.0.11.ELsmp #1 SMP Tue Sep 15 07:16:37 EDT 2009 i686 i686 i386 GNU/Linux
可能最安全的做法是使用
yum erase <package>-<version>
. 基本上,你在那裡有什麼,但.EL
沒有必要包括在內。rpm -e
如果由於某種原因 yum 不可用,您可以使用。您要非常小心,不要刪除目前正在執行的核心。我注意到也有開發包。聽起來這些對您來說可能完全沒有必要,但我會先刪除最舊的版本,直到您對釋放的空間量感到滿意為止。
Yum 應該處理它,但還要確認引導條目已從 /etc/grub.conf 中刪除。