How to delete the old kernel after upgrading?

Asked by Jeffrey

I upgraded my kernel to:
Linux jeffrey-desktop 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux
but in the grub menu I have the old kernel too - I realize that is there just in case I can't boot into this one. Now that I have do I still need to keep the old kernel? What files can be deleted so I can save some space on my disk? how to delete downloaded updates? Do I need them in the cache?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cesare Tirabassi (norsetto) said :
#1

You better don't manually delete anything, remove it using your preferred tool.
For instance using apt-get: sudo apt-get remove name_of_old_kernel
One way to delete cached updates is to do a "sudo apt-get clean" from terminal.

Revision history for this message
Aanjhan Ranganathan (aanjhan) said :
#2

You can also do it from synaptic package manager.
You can find your latest and old kernels from the section "base System" and mark them for removal.
But *dont* do it manually.

Revision history for this message
Luis Jorge (luisjorge) said :
#3

Hi! Just a tip:

By experience I tell you that you should keep the old kernel, just in case anything goes wrong, unless of course, you absolutely need the extra space on your disk. If something fails or is changed on the kernel configuration and you can't boot onto it, it's REALLY easy to reinstall it by booting from the old kernel (you can just use synaptic to reinstall anything with the name of your new kernel), but not so easy if you only had that kernel that was damaged.

Anyway, if you do remove it, as everyone said, DON'T do it manually! :D

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#4

You can remove old kernel version using System→Administration→Synaptic package manager and searching "linux-image".

I think it is always better to have 2 kernel so if one gives you problems you can always return the previous.

Hope this help.

Revision history for this message
Usama Akkad (damascene) said :
#5

until now there is no simple fix for this. there should be a tool for that

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#6

Please copy and paste hre the result of this terminal command:

dpkg -l | grep -i ^^ii | grep -i linux-image

Can you help with this problem?

Provide an answer of your own, or ask Jeffrey for more information if necessary.

To post a message you must log in.