Low Disk Space on "boot"

Hello,

For a few months now 12.04 Desktop Edition has been informing me that I only have 2.9MB desk space remaining.

I have never seen this message on previous versions of ubuntu - does anyone know a method (preferably something in terminal) that will allow me to erase all but the current grub version? Or whatever is deemed the appropriate # of grub versions to keep. Unless I clean up the boot folder I cannot install crucial updates (its been two months since my last update/upgrade).

Re: Low Disk Space on "boot"

To get a report of how much disk space is available and what is taking up the space where; terminal code:

Code:

df -h

IF indeed you find that boot is full, This method to delete old kernels and headers:
The command in terminal:

Code:

uname -a

will tell you which kernel you are running....then:
-- if you have the disk space--
Go to Synaptic Package Manager select status on the left-lower pane and select installed on the left-upper pane and search for linux-image.
select the ones you want deleted. listed in the right-upperpane.
and mark for removal/complete removal.
Click the Apply button in the toolbar and then Apply in the summary window that pops up. Close Synaptic Package Manager.
sudo update-grub
if spm is not installed; terminal code:

Code:

sudo apt-get install synaptic

In addition to linux-image, also remove old versions of linux-headers and linux-restricted-modules (if you have them).

To look at the disk usage:

Code:

du -h /home | sort -nr | less

by directories ->change the /home in the above to different directories to "see". Pay particular attention to the /var/log/ directory...many times there exist lots of old files.; And it does happen there is a system problem the system is advising of that results in extremely large log files.

just try'n to help <== BDQ

Last edited by Bashing-om; November 18th, 2012 at 12:47 AM.
Reason: if you have the disk space !

Re: Low Disk Space on "boot"

Do you have a separate /boot partition, and if so is there a good reason why you installed with one, as it tends to complicate matters in most cases.

You can see how many kernels or OSs are on your system with

Code:

grep menuentry /boot/grub/grub.cfg

which will list everything that appears in the grub menu, including any other OSs, eg Windows or other Linux OSs. It will also show all the different kernels that are installed and you can then uninstall all except the two latest using software-center or synaptic, or whatever you normally use for package management.

Unfortunately as a result of the newer version of grub in 12.10, that command is no longer very helpful. It still works but grub now has a lot of extraneous information in grub.cfg which just complicates the output, making it almost useless, though I am sure there must be a way of extracting only what is needed somehow or other.