Σελίδα 1 από 1

Αφαίρεση παλαιών πυρήνων

Δημοσιεύτηκε: Δευ Δεκ 20, 2021 09:08 am
από dglent
Με αυτό το σκριπτ μπορούμε να αφαιρέσουμε αυτόματα τους παλιούς πυρήνες από το σύστημα

http://www.mageia-gr.org/rpm/8/noarch/u ... noarch.rpm

Κώδικας: Επιλογή όλων

[root@localhost dglent]# urpme_old-kernels -h
Usage: /usr/sbin/urpme_old-kernels: [-a] [-d] [-t] [-n value] [-p] 
    -a = automatic, no question. Interactive if not specified
    -d or -t = Debug or test mode, nothing is removed, urpme is simulated
    -n value = number of kernels to keep (-n3 or -n 3 keep 3 kernels), Min=2, Default=2
    -p = show (print) the urpme commands which can be used 
    -v = version
    -? or -h = show this help.
Old kernels are removed safely and cleanly. As urpme is used, grub is automatically updated.
https://bugs.mageia.org/show_bug.cgi?id=24403

Re: Αφαίρεση παλαιών πυρήνων

Δημοσιεύτηκε: Πέμ Δεκ 23, 2021 07:17 am
από dglent
Παράδειγμα χρήσης:

Κώδικας: Επιλογή όλων

[root@localhost dglent]# urpme_old-kernels -a
Number of kernels in /boot/ : 3
 ==> kernel-desktop
 1 : keep   : kernel-desktop-5.15.10-1.mga8-1-1.mga8.x86_64 Τετ 22 Δεκ 2021 04:28:59 πμ CET used now 
 2 : keep   : kernel-desktop-5.15.6-4.mga8-1-1.mga8.x86_64  Πεμ 09 Δεκ 2021 06:54:43 πμ CET 
 3 : remove : kernel-desktop-5.15.6-2.mga8-1-1.mga8.x86_64  Δευ 06 Δεκ 2021 06:51:08 μμ CET 
 ==> kernel-desktop-devel
 1 : keep   : kernel-desktop-devel-5.15.10-1.mga8-1-1.mga8.x86_64 Τετ 22 Δεκ 2021 04:28:30 πμ CET used now 
 2 : keep   : kernel-desktop-devel-5.15.6-2.mga8-1-1.mga8.x86_64 Δευ 06 Δεκ 2021 06:50:44 μμ CET 

αφαίρεση του kernel-desktop-5.15.6-2.mga8-1-1.mga8.x86_64
αφαίρεση του πακέτου kernel-desktop-5.15.6-2.mga8-1-1.mga8.x86_64
      1/1: αφαίρεση του kernel-desktop-5.15.6-2.mga8-1-1.mga8.x86_64
                                 #################################################################################################################################
writing /var/lib/rpm/installed-through-deps.list

Το παρακάτω πακέτο :
  kernel-desktop-5.15.6-4.mga8-1-1.mga8.x86_64
είναι πλέον ορφανό, αν επιθυμείτε να το αφαιρέσετε, μπορείτε να χρησιμοποιήσετε "urpme --auto-orphans"
 Gain : 106872 k  -  Kernels in /boot/: 2 
 
[root@localhost dglent]# 

Re: Αφαίρεση παλαιών πυρήνων

Δημοσιεύτηκε: Πέμ Σεπ 28, 2023 06:37 am
από dglent
Στην Mageia 9 υπάρχει το πακέτο remove-old-kernels το οποίο τρέχει στο παρασκήνιο και κάνει την δουλειά από μόνο του (για να μην φτάνουμε στο σημείο να έχουμε πάρα πολλούς πυρήνες εγκατεστημένους)

Κώδικας: Επιλογή όλων

[dglent@localhost ~]$ urpmq -i remove-old-kernels
Name        : remove-old-kernels
Version     : 0.99.21.7
Release     : 1.mga9
Group       : System/Kernel and hardware
Size        : 122903                       Architecture: noarch
Source RPM  : remove-old-kernels-0.99.21.7-1.mga9.src.rpm
URL         : https://github.com/barjac/remove-old-kernels
Summary     : Remove old kernels safely and cleanly using urpme
Description :
Remove old kernels safely and cleanly using urpme.

Once installed it may be left to do it's job without user intervention.

It is run by cron.weekly to retain a minimum number of installed kernels
of each flavour. (Default is three)
This may be adjusted or disabled using simple command line options if desired.

There is also an advanced mode with some expert features.

It may also be run manually in interactive mode from the desktop menu, under
Tools -> System tools.

Running as normal user from the command line will display the current status
of installed kernels but will not allow removal.

For more information see: 'man remove-old-kernels' or 'man rok' in a terminal.