I installed synaptic package manager to manage my packages and, I see many kernels, that are not being used, can I delete them? There are 2 - 3 using kernels and many non using.
-
2What do you mean by "cores" ? CPU cores, or something else ? Please [edit] your question and clarify what exactly you mean, and what the problem is. – Jonas Czech Jul 05 '16 at 21:16
-
linux-generic, linux-generic-extra – Rostislav Jul 05 '16 at 21:30
-
Kernels, you mean - I'd recommend leaving them, and they only take up a few MBs of space anyway, and don't use any other resources. Removing the wrong one may render your computer unbootable ! – Jonas Czech Jul 05 '16 at 21:33
2 Answers
Purge old kernels: http://blog.dustinkirkland.com/2016/06/purge-old-kernels.html
If you're using Xenial, it's included in the Byobu package, so you can run it straightaway if you have that installed:
sudo purge-old-kernels
If you're using an earlier version of Ubuntu, then you can download the script from here: https://bazaar.launchpad.net/~kirkland/byobu/trunk/download/head:/purgeoldkernels-20160229030309-vgiaonyu553ugyrz-1/purge-old-kernels
Just make it executable and run it:
chmod +x purge-old-kernels
sudo ./purge-old-kernels

- 3,110
-
2In Xenial the script is installed via the
byobu
package, which is only installed by default on the server. – Gunnar Hjalmarsson Jul 05 '16 at 23:00 -
1@GunnarHjalmarsson Edited accordingly, thanks for the correction. – Alcuin Arundel Jul 05 '16 at 23:05
Don't delete packages at random!! You will end up breaking system functionality. To delete unnecessary packages, open a Terminal window and type:
sudo apt-get update
sudo apt-get autoremove
This will delete very old kernels too. Ubuntu (and other linuxes) are keeping 2 or more kernel versions installed at all times as backup. If one kernel fails for any number of reasons, the next one will automatically boot instead. This ensures a 100% fail-proof operation. Not like stupid Windows with just one kernel and multiple blue screens.