How to free up hard drive space by removing old linux kernel files

The linux kernel is, among other things, something that gets updated periodically when you update your system. When this happens, the kernel that’s being replaced is not deleted, it’s left on your system, but just not used anymore. For example, as I write this, I’m using the 2.6.24-24 kernel. My system may still contain older versions, like 2.6.24-23, or 2.6.24-19, etc. I no longer need these older versions, and they are taking up space on my hard drive. Removing these older versions will free up some hard drive space. The first thing you need to do is find out which kernel you’re currently using, so that you don’t delete it.

Find out which kernel you’re using

System tab

System tab

You need to open the System Monitor, in the Administration menu. Here’s how…

  1. System > Administration > System Monitor
  2. Click on the System tab
  3. Write down the kernel version(see red rectangle in pic) that you find under the Ubuntu heading

Remove old kernels

Just a note before you get started. Be sure to only delete the older kernels, and not the most recent version, which is the one you’re currently using. The one you’re currently using is the one you wrote down from the System Monitor. Now you just have to delete the older ones.

  1. System > Administration > Synaptic Package Manager (enter your password)
  2. Scroll down to “linux-headers-2.x.x-xx
  3. The green boxes on the left indicate software that is currently installed
  4. Click on the green boxes next to the older versions of the linux-header & choose Mark for Complete Removal
  5. Repeat this for the following packages…
    • linux-image
    • linux-restricted modules
    • linux-ubuntu-modules

If you’d like to see how much space these things take up you can have Synaptic show you.

  1. Open Preferences from the Settings menu
  2. Go to the Columns and Fonts tab
  3. Check the box next to Installed Size
  4. Click the Move Up button until the Installed Size option is at the top (This will insure that the size shows up)

Word of caution

Please don’t do this immediately after an update. There have been times when a kernel update has caused a problem that was subsequently fixed. The safe thing is to wait for a while after the kernel has been updated to remove the old ones.

  • Share/Bookmark

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>