0

While installing the most recent version of the kernel, I ran out of disk space. How do I go back and delete all of the old versions of the kernel that are occupying my disk

  • There are lot of ways to delete old kernels.read the following http://askubuntu.com/questions/2793/how-do-i-remove-or-hide-old-kernel-versions-to-clean-up-the-boot-menu – Dpk Nov 08 '13 at 16:36

2 Answers2

0

I believe a sudo apt-get autoremove will help you with that and sudo apt-get autoclean

If you are not using something older then 12.04

Goddard
  • 4,724
  • 2
  • 33
  • 51
0

If those kernels are selected for manual installation (which is likely since "apt-get upgrade" doesn't install them automatically, you need to issue "apt-get install" on them manually), "apt-get autoremove" won't help.

In this case:

dpkg --get-selections linux\*

Look for installed packages belonging to the older kernel, then issue "apt-get remove" on them. For example:

apt-get remove linux-headers-3.11.0-12 linux-image-3.11.0-12-generic linux-image-extra-3.11.0-12-generic

Then issue "apt-get autoclean" to get rid of cached package files.