old_kernel_cleanup
Differences
This shows you the differences between two versions of the page.
| old_kernel_cleanup [2026/02/27 23:09] – created tomek | old_kernel_cleanup [2026/02/27 23:16] (current) – tomek | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Old Kernel Cleaup ====== | ====== Old Kernel Cleaup ====== | ||
| + | [[https:// | ||
| + | ===== Bakup GRUB and initrd ===== | ||
| + | < | ||
| + | cp / | ||
| + | cp / | ||
| + | </ | ||
| + | |||
| + | ===== Removing old kernel packages ===== | ||
| + | < | ||
| + | // First list packages to delete // | ||
| + | ls / | ||
| + | |||
| + | // Then run removepkg command // | ||
| + | removepkg / | ||
| + | removepkg / | ||
| + | removepkg / | ||
| + | removepkg / | ||
| + | </ | ||
| + | |||
| + | //Do not remove kernel headers because if we'll remove kernel-headers by removepkg command we delete key system directories f.e. for script compiling so system would start but we wouldn' | ||
| + | |||
| + | Then check does removepkg command cleaned all old kernel symlinks and folders. If not delete them manually: | ||
| + | < | ||
| + | cd /boot | ||
| + | rm -f config-generic-5.15.193.x64 config-huge-5.15.193.x64 | ||
| + | rm -f System.map-generic-5.15.193 System.map-huge-5.15.193 | ||
| + | rm -f vmlinuz-generic-5.15.193 vmlinuz-huge-5.15.193 | ||
| + | rm -rf / | ||
| + | </ | ||
| + | |||
| + | ===== Setting up new main kernel ===== | ||
| + | < | ||
| + | cd /boot | ||
| + | ln -sf vmlinuz-6.18.8 vmlinuz | ||
| + | ln -sf System.map-6.18.8 System.map | ||
| + | ln -sf .config-6.18.8 config | ||
| + | </ | ||
| + | |||
| + | ===== Generate new GRUB config ===== | ||
| + | < | ||
| + | grub-mkconfig -o / | ||
| + | </ | ||
old_kernel_cleanup.1772233752.txt.gz · Last modified: by tomek
