how_to_delete_old_unused_kernels
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
how_to_delete_old_unused_kernels [2022/06/12 09:32] – dino | how_to_delete_old_unused_kernels [2024/03/12 21:23] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
To find out the current version of Linux kernel running on your system, use the following command. | To find out the current version of Linux kernel running on your system, use the following command. | ||
- | < | + | < |
- | **//Linux 4.12.0-041200-generic/ | + | Linux 4.12.0-041200-generic |
+ | </code> | ||
To list all installed kernels on your system, issue this command. | To list all installed kernels on your system, issue this command. | ||
- | < | + | < |
+ | |||
+ | linux-image-4.12.0-041200-generic | ||
+ | linux-image-4.8.0-22-generic | ||
+ | linux-image-extra-4.8.0-22-generic | ||
+ | linux-image-generic | ||
+ | </ | ||
- | **// | ||
- | linux-image-4.8.0-22-generic\\ | ||
- | linux-image-extra-4.8.0-22-generic\\ | ||
- | linux-image-generic// | ||
Run the commands below to remove a particular linux-image along with its configuration files, then update grub2 configuration, | Run the commands below to remove a particular linux-image along with its configuration files, then update grub2 configuration, | ||
Line 20: | Line 23: | ||
$ sudo reboot</ | $ sudo reboot</ | ||
- | And that's it. However, Although this method works just fine, it is more reliable and efficient to use a handy script called “byobu” that combines all the commands above into a single program with useful options such as specifying number of kernels to keep on the system. | + | And that's it. |
- | + | ||
- | Install byobu script package which provides a program called purge-old-kernels used for removing old kernels and header packages from the system. | + | |
- | + | ||
- | < | + | |
- | + | ||
- | Then remove old kernels like so (the command below allows 2 kernels to be kept on the system). | + | |
- | + | ||
- | < | + |
how_to_delete_old_unused_kernels.1655026330.txt.gz · Last modified: 2024/03/12 21:23 (external edit)