How do I uninstall prior version of Ubuntu?

Asked by Rostrea

Whenever I run the Update Manager, a new version of Linux is installed and then a new entry in the GRUB OS loader is added (I'm using dual boot with Windows Vista on my laptop). I now have many entries for Linux starting with 2.4.16 all the way up to 2.4.21). I want to remove the older versions of Linux so that I only keep the last two version. How do I accomplish this. The Synaptic Package Manager does not allow me to do an uninstall.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Wyatt Smith
Solved:
Last query:
Last reply:
Revision history for this message
Best Wyatt Smith (wyatt-smith) said :
#1

You need to edit you menu.lst file with root privileges so open a terminal and type

gksudo gedit /boot/grub/menu.lst

Edit the this section

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

change to this

# howmany=2

Save the file and exit.

Then type this is the terminal

sudo update-grub

Revision history for this message
Rostrea (rostrea) said :
#2

Thank you Mr. Smith for your response and instructions!!! Your instructions was very useful as it allowed me to modify the menu list file which I tried to do before using a similar instructions I found on the net but for some reason it did not work. I think the difference was the 'gksudo' command that you have in your instructions.

I had a Windows Vista OS in the bottom of the menu that I wanted to continue to use so I just deleted all the menu entries in the middle and it worked. I am now able to see just three entries, the two latest version of Ubuntu and the Windows Vista.

I appreciate the assistance!
Rene Ostrea

Revision history for this message
Rostrea (rostrea) said :
#3

Thanks Wyatt Smith, that solved my question.

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#4

Although setting the howmany=2 parameter will clean up you grub menu. It does only remove the older kernels from you system. To uninstall the kernels that you no longer use, you can open synaptic and hit the search button. In the ´Search´ box put linux-image and in the ´Look in´ box select Name. Right click on the kernels you no longer use (16,17,18) and select Mark for removal. Hit the apply button and this will uninstall the unwanted kernels.

Revision history for this message
Rostrea (rostrea) said :
#5

Thank you again Mr. Smith. I was happy just to be able to cleanup the boot options, but this is exactly what I was looking for. I tried using the Synaptic Package Manager, but I was lost. I followed the latest instructions you provided and it worked like a charm. Thank you for taking the extra time to answer my call for help. You're awesome!!! You really know this stuff and I appreciate you helping those who are new to this like me. It is nice to know that someone like you is always willing to help.