4

Off late I am receiving continuous system alerts regarding low disk space in my root directory. I am given to understand that all my system updates are being saved in my root directory instead of my home directory and I do not know how to change this!!

This is the output of my /boot:

/boot$ ll
total 73144
drwxr-xr-x  3 root root     4096 Sep 12 01:09 ./
drwxr-xr-x 25 root root     4096 Aug  3 03:19 ../
-rw-r--r--  1 root root   848290 Jan 25  2013 abi-3.5.0-23-generic
-rw-r--r--  1 root root   852420 Jun 20 14:46 abi-3.5.0-36-generic
-rw-r--r--  1 root root   852910 Jul 10 14:09 abi-3.5.0-37-generic
-rw-r--r--  1 root root   147880 Jan 25  2013 config-3.5.0-23-generic
-rw-r--r--  1 root root   148142 Jun 20 14:46 config-3.5.0-36-generic
-rw-r--r--  1 root root   148157 Jul 10 14:09 config-3.5.0-37-generic
drwxr-xr-x  3 root root    12288 Sep 12 01:07 grub/
-rw-r--r--  1 root root 15540700 Jul 25 14:14 initrd.img-3.5.0-23-generic
-rw-r--r--  1 root root 15626049 Jul 26 03:38 initrd.img-3.5.0-36-generic
-rw-r--r--  1 root root 15688487 Sep 12 01:09 initrd.img-3.5.0-37-generic
-rw-r--r--  1 root root   176764 Nov 27  2011 memtest86+.bin
-rw-r--r--  1 root root   178944 Nov 27  2011 memtest86+_multiboot.bin
-rw-------  1 root root  3023265 Jan 25  2013 System.map-3.5.0-23-generic
-rw-------  1 root root  3021733 Jun 20 14:46 System.map-3.5.0-36-generic
-rw-------  1 root root  3022033 Jul 10 14:09 System.map-3.5.0-37-generic
-rw-r--r--  1 root root  5189248 Jul 25 11:06 vmlinuz-3.5.0-23-generic
-rw-------  1 root root  5183904 Jun 20 14:46 vmlinuz-3.5.0-36-generic
-rw-------  1 root root  5184992 Jul 10 14:09 vmlinuz-3.5.0-37-generic

Will deleting any unused kernel files help? I am pretty confident that my current kernel version is 3.5.0-37-generic, so does that imply I can delete the other two: 0-23 and 0-36 ? which files should I be deleting here or none at all?

Also, are there any other things I should be doing in order to free up space on my root folder and make room for further system updates? Is there any way to change this location to somewhere in the "home" directory instead?? Thanks in advance !

Edit:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda10      5.7G  5.2G  244M  96% /
udev            1.9G  4.0K  1.9G   1% /dev
tmpfs           766M  928K  766M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.9G  368K  1.9G   1% /run/shm
/dev/sda11       27G   16G  9.8G  61% /home

3 Answers3

4

You can use Ubuntu Tweak to easily clean up your system. It's a graphical tool which let you tweak the system and also, into the "Janitor" section you can clean the system (clean browser cache, app cache, old kernels, etc) using a graphical tool, so you don't have to do this manually.
You can download & install it from http://ubuntu-tweak.com/

After that you removed the old kernels, in order to remove them form /boot and grub too, you have to update your grub config. To do this, just run:
sudo update-grub

3

sudo apt-get autoremove to remove unnecessary packages. (say yes to the prompt) sudo apt-get clean to remove the cached update .deb files (you've already installed the updates so you won't need the installers.

btw, just how much space do you have and how much is used? what does df -h return?

staticd
  • 3,025
0

by issuing this command you can see old kernels:

dpkg -l 'linux-' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.)-([^0-9]+)/\1/")"'/d;s/^[^ ]* [^ ]* ([^ ])./\1/;/[0-9]/!d'

you can also check version you use by:

uname -a

and then remove obsolete updates by:

sudo apt-get -y purge [here goes name of kernel you got with dpkg]