Sa incepem
ne logam cu userul
dupa cu comanda su ne logam ca root si folosim:
Code: Select all
uname -r
Code: Select all
linux-image-5.10.12-xanmod1
Pentru a vedea ce kernel rulam in acest moment
Iar dupa sa vedem pe toate cele active
Code: Select all
dpkg -l | grep linux-image | awk '{print$2}'
Code: Select all
root@crywolf1989:~# dpkg -l | grep linux-image | awk '{print$2}'
linux-image-4.19.0-14-amd64
linux-image-4.19.0-8-amd64
linux-image-5.10.12-xanmod1
linux-image-amd64
root@crywolf1989:~#
Code: Select all
sudo apt remove --purge nume-kernel-din-lista-de-mai-sus
EX:
Code: Select all
sudo apt remove linux-image-5.10.12-xanmod1
Code: Select all
root@crywolf1989:~# dpkg -l | grep linux-image | awk '{print$2}'
linux-image-4.19.0-14-amd64
linux-image-4.19.0-8-amd64
linux-image-5.10.12-xanmod1
linux-image-amd64
root@crywolf1989:~# uname -r
5.10.12-xanmod1
root@crywolf1989:~# sudo apt remove linux-image-5.10.12-xanmod1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-5.10.12-xanmod1 linux-xanmod
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 349 MB disk space will be freed.
Do you want to continue? [Y/n]
ATENTIE: Dupa ce kernelul a fost sters este necesara introducerea urmatorilor doua comenzi, voi spune si de ce:
Code: Select all
apt autoremove
Code: Select all
sudo update-grub
Si ca la final intodeauna
Code: Select all
reboot
Se poate instala un program care va poate ajuta mai rapid cu acestea
folosim comanda
Code: Select all
sudo apt-get install byobu
Code: Select all
sudo purge-old-kernels --keep 2
sudo sterge-kernelul-vechi --pastreaza 2
Ea va sterge kernelul vechi pastrand doar ultimele 2 kernele instalate.