UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm looking to clean up older versions of Ubuntu from my hard drive as well as merely from the GRUB menu. I know that editing the /boot/grub/menu.lst file will clean up the menu, but what about the actual older kernels and other related stuff? Shouldn't those also be removed? I found the /lib/modules/ directory. Do those and/or other files need to be deleted? Would deleting them cause problems?
Thanks for any pointers!
Joe
Click here to see the post LQ members have rated as the most helpful post in this thread.
OK. I notice that this thread has been viewed 18,510 times but I appear to be the only one with a further question!
Having looked-up 'linux-image' in Synaptics Package Manager, how do I know which ones are safe to remove?
Am I to be guided by the checkboxes on the left (some grayed-out, some with an icon?) or if they don't have an entry in the 'Installed Version' column?
Complete noob to any form of linux and do not want to risk any harm to system!
@Tim Silver,
The command uname -a in a terminal will tell you which kernel you are running as opposed to which kernels you may have available. Mine looks like this:
Code:
tred@vaio:~$ uname -a
Linux vaio 2.6.24-19-generic #1 SMP Wed Jun 4 16:35:01 UTC 2008 i686 GNU/Linux
tred@vaio:~$
So I can remove all kernels, and headers and sources except2.6.24-19-generic
In practice, I like to keep at least one "old" kernel, in case I find that the latest one has broken something that used to work with the older kernel.
I hope I'm not hijacking a thread - but this is very related.
I'm running dual boot Ubuntu 8.04 and Windows Vista. I understand that when Ubuntu 8.04 is replaced by the next full incarnation of Ubuntu - it can be installed by simply 'updating' - which I understand. However, I have grub set up to launch Vista/Longhorn as default, and have edited grub's menu.list so that this remains the case when new kernels of Hardy are introduced, removing the old kernels, as suggested above. My question is, would the new full version of Ubuntu retain my grub settings, or will I need to edit a new version of grub, as I did the old one?
I dual boot Vista and Ubuntu. With the list of kernel versions getting really long, I tried to erase the older ones and I think I erased them all. When I boot up I still come to the menu that allows me to choose, but there's no longer a choice for Ubuntu, only Windows. Can I reinstall the kernel without reinstalling Unbuntu?
With the list of kernel versions getting really long, I tried to erase the older ones and I think I erased them all. When I boot up I still come to the menu that allows me to choose, but there's no longer a choice for Ubuntu, only Windows.
Well, when you "erased them all", you probably just did exactly that, and you won't have a choice to boot them, because there is no longer anything to boot: They don't exist, because you erased them.
Perhaps a reinstall of your preferred distro is needed now.
In future, please start a new thread for a new problem.
Welcome to LQ!
[Edit:] If you have vital files on your linux partitions, they can maybe be recovered. Post more information [/Edit]
I too am a beginner with ubuntu. I had to reinstall ubuntu and the old version is still showing in grub how do I know which image is the old one and which is the new. Like tim said is it the greyed out boxes if not why are some greyed out
I had to reinstall ubuntu and the old version is still showing in grub how do I know which image is the old one and which is the new. Like tim said is it the greyed out boxes if not why are some greyed out
The "greyed out boxes" probably refer to kernels that are mentioned in grub's configuration file (I am being deliberately vague here, as I do not know for sure if you are using grub or grub2, I suspect the latter, which I have little experience of).
You can either ignore them, try booting from them (may not work, but you may get a useful error message), or edit the configuration file to remove them.
The "latest version" is likely to be the default one at the top of the list, with the most up-to-date number.
I've never responded here before. Hope I'm doing it correctly. I had a large number of old kernels which did not appear in Synaptic Package Manager. I realized with the help of this thread, that I no longer actually had the packages. To eliminate the listings from the grub2 menu I opened a terminal. Then typed cd /boot. Then ls to list the contents. From there I used rm to remove all related files eg. sudo rm /boot/vmlinuz-2.6.28-15-generic, sudo rm /boot/initrd.img-2.6.28-15-generic, sudo rm vmcoreinfo-2.6.31-15-generic, sudo rm System.map-2.6.31-15-generic, sudo rm config-2.6.28-15-generic, sudo rm abi-2.6.31-15-generic. I did this for each unwanted version. I don't know if I had to remove all those files but since they referred to old unwanted versions I got rid of them anyways. I then typed sudo update-grub, crossed my fingers (a meaninless ritual) and did a reboot. Now all is well. I hope this answer helps someone out there...
Kernels are No Longer In Synaptic Package Manager...
I've never responded here before. Hope I'm doing it correctly. I had a large number of old kernels which did not appear in Synaptic Package Manager. I realized with the help of this thread, that I no longer actually had the packages. To eliminate the listings from the grub2 menu I opened a terminal. Then typed cd /boot. Then ls to list the contents. From there I used rm to remove all related files eg. sudo rm /boot/vmlinuz-2.6.28-15-generic, sudo rm /boot/initrd.img-2.6.28-15-generic, sudo rm vmcoreinfo-2.6.31-15-generic, sudo rm System.map-2.6.31-15-generic, sudo rm config-2.6.28-15-generic, sudo rm abi-2.6.31-15-generic. I did this for each unwanted version. I don't know if I had to remove all those files but since they referred to old unwanted versions I got rid of them anyways. I then typed sudo update-grub, crossed my fingers (a meaninless ritual) and did a reboot. Now all is well. I hope this answer helps someone out there...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.