Emre Çamalan'ın Kişisel Güncesi

Ben, sen sen olduğun için, benim!

Centos 7 : Eski Kernelleri Temizleyin

Bilgisayarınız ilk açılışta GRUB menüsünde size eski sürüm kernelleri de gösterir ve bir süre sonra orada bir süre sonra 10’larca satır görmeye başlarsınız.

Bu demek oluyorki her bir çekirdek için yaklaşık 100MB yer ayırdınız ve boşa duruyor.. Bunun için orayı temizlemeye karar verdiyseniz yum-utils sizin yardımınıza koşacaktır.

Öncelikle kaç tane Kernel var sisteminizde bir kontrol edin;

rpm -q kernel
ecamalan]# rpm -q kernel
kernel-3.10.0-123.9.2.el7.x86_64
kernel-3.10.0-123.9.3.el7.x86_64
kernel-3.10.0-123.13.1.el7.x86_64
kernel-3.10.0-123.13.2.el7.x86_64
kernel-3.10.0-123.20.1.el7.x86_64

Sonra her ihtimale karşı son 2 tanesini bırakmak üzere diğer işlemlerimizi yapalım.

yum install yum-utils
ecamalan]# yum install yum-utils
Loaded plugins: etckeeper, fastestmirror, langpacks
adobe-linux-x86_64                                       |  951 B     00:00     
base                                                     | 3.6 kB     00:00     
dag                                                      | 1.9 kB     00:00     
epel/x86_64/metalink                                     |  24 kB     00:00     
epel                                                     | 4.4 kB     00:00     
extras                                                   | 3.4 kB     00:00     
google-chrome                                            |  951 B     00:00     
nux-dextop                                               | 2.9 kB     00:00     
rpmforge                                                 | 1.9 kB     00:00     
updates                                                  | 3.4 kB     00:00     
epel/x86_64/primary_db                                     | 4.0 MB   00:06     
(1/3): google-chrome/primary                               | 1.9 kB   00:00     
(2/3): epel/x86_64/updateinfo                              | 285 kB   00:00     
(3/3): epel/x86_64/pkgtags                                 | 1.4 MB   00:01     
Loading mirror speeds from cached hostfile
 * base: mirror.city.net.tr
 * epel: mirror.euserv.net
 * extras: mirror.city.net.tr
 * nux-dextop: li.nux.ro
 * rpmforge: miroir.univ-paris13.fr
 * updates: mirror.city.net.tr
google-chrome                                                               3/3
Package yum-utils-1.1.31-25.el7_0.noarch already installed and latest version
Nothing to do

Zaten yüklü olduğu için birşey yapmadı.

package-cleanup --oldkernels --count=2

 

ecamalan]# package-cleanup --oldkernels --count=2
Loaded plugins: etckeeper, fastestmirror, langpacks
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-123.9.2.el7 will be erased
---> Package kernel.x86_64 0:3.10.0-123.9.3.el7 will be erased
---> Package kernel.x86_64 0:3.10.0-123.13.1.el7 will be erased
---> Package kernel-devel.x86_64 0:3.10.0-123.9.2.el7 will be erased
---> Package kernel-devel.x86_64 0:3.10.0-123.9.3.el7 will be erased
---> Package kernel-devel.x86_64 0:3.10.0-123.13.1.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch         Version                   Repository      Size
================================================================================
Removing:
 kernel             x86_64       3.10.0-123.9.2.el7        @updates       127 M
 kernel             x86_64       3.10.0-123.9.3.el7        @updates       127 M
 kernel             x86_64       3.10.0-123.13.1.el7       @updates       127 M
 kernel-devel       x86_64       3.10.0-123.9.2.el7        @updates        31 M
 kernel-devel       x86_64       3.10.0-123.9.3.el7        @updates        31 M
 kernel-devel       x86_64       3.10.0-123.13.1.el7       @updates        31 M

Transaction Summary
================================================================================
Remove  6 Packages

Installed size: 474 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
etckeeper: pre transaction commit
  Erasing    : kernel-devel.x86_64                                          1/6 
  Erasing    : kernel.x86_64                                                2/6 
warning: file /lib/modules/3.10.0-123.9.2.el7.x86_64/weak-updates: remove failed: No such file or directory
warning: file /lib/modules/3.10.0-123.9.2.el7.x86_64/modules.softdep: remove failed: No such file or directory
warning: file /lib/modules/3.10.0-123.9.2.el7.x86_64/modules.devname: remove failed: No such file or directory
  Erasing    : kernel-devel.x86_64                                          3/6 
  Erasing    : kernel.x86_64                                                4/6 
warning: file /lib/modules/3.10.0-123.13.1.el7.x86_64/weak-updates: remove failed: No such file or directory
warning: file /lib/modules/3.10.0-123.13.1.el7.x86_64/modules.softdep: remove failed: No such file or directory
warning: file /lib/modules/3.10.0-123.13.1.el7.x86_64/modules.devname: remove failed: No such file or directory
  Erasing    : kernel-devel.x86_64                                          5/6 
  Erasing    : kernel.x86_64                                                6/6 
warning: file /lib/modules/3.10.0-123.9.3.el7.x86_64/weak-updates: remove failed: No such file or directory
warning: file /lib/modules/3.10.0-123.9.3.el7.x86_64/modules.softdep: remove failed: No such file or directory
warning: file /lib/modules/3.10.0-123.9.3.el7.x86_64/modules.devname: remove failed: No such file or directory
etckeeper: post transaction commit
  Verifying  : kernel-3.10.0-123.9.3.el7.x86_64                             1/6 
  Verifying  : kernel-devel-3.10.0-123.9.3.el7.x86_64                       2/6 
  Verifying  : kernel-3.10.0-123.13.1.el7.x86_64                            3/6 
  Verifying  : kernel-devel-3.10.0-123.13.1.el7.x86_64                      4/6 
  Verifying  : kernel-3.10.0-123.9.2.el7.x86_64                             5/6 
  Verifying  : kernel-devel-3.10.0-123.9.2.el7.x86_64                       6/6 

Removed:
  kernel.x86_64 0:3.10.0-123.9.2.el7                                            
  kernel.x86_64 0:3.10.0-123.9.3.el7                                            
  kernel.x86_64 0:3.10.0-123.13.1.el7                                           
  kernel-devel.x86_64 0:3.10.0-123.9.2.el7                                      
  kernel-devel.x86_64 0:3.10.0-123.9.3.el7                                      
  kernel-devel.x86_64 0:3.10.0-123.13.1.el7                                     

Complete!

Son 2 kernel’iniz kaldı diğerleri silindi bayağıda bir yer açıldı…

, , ,

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

*

Bu site, istenmeyenleri azaltmak için Akismet kullanıyor. Yorum verilerinizin nasıl işlendiği hakkında daha fazla bilgi edinin.