Low disk space on file system message on:

 - Elementary: `elementary OS Freya (64-bit)` Built on "Ubuntu 14.04
   LTS"
 - File manager: `Files 0.2.4`

I want to create more disk space and running the command `df-h` gives the following output:

    Filesystem  Size  Used Avail Use% Mounted on
    udev            1.9G  4.0K  1.9G   1% /dev
    tmpfs           390M  1.2M  389M   1% /run
    /dev/sda1        19G   18G  637M  97% /
    none            4.0K     0  4.0K   0% /sys/fs/cgroup
    none            5.0M     0  5.0M   0% /run/lock
    none            2.0G   78M  1.9G   4% /run/shm
    none            100M   44K  100M   1% /run/user
    /dev/sdb1       823G   31G  751G   4% /home

I can't install any programs as there is no space on `/dev/sda1`, so I cannot install a program with a user interface to view files.

Therefore we took the following route:

So, the first disk is very small, and **Plan A** is just to free up enough stuff on it to stop it moaning. **Plan B** would he to move some stuff over to the spacious disk, and link it in. But hopefully A will work!

I reckon there's a lot of unused kernel images in `/boot`, it seeks to get a known weakness with elementary that it doesn't tidy old ones up. I had a web page up that described how to remove them and then update the grub menu so it didn't offer them anymore. But the first command was giving a funny error. I'm following the suggestions on this page:

https://elementaryos.stackexchange.com/questions/95/how-to-remove-old-kernel-versions


----------


So, we ran this command:

    dpkg -l | fgrep linux-image-

It will list a lot of kernel images, most of which you aren't actively using. They're all similarly named, differentiated by a numerical suffix e.g. "`.151`" To find out which one you are using when you boot up, run this:

    uname -r

The result was an old kernel image: `3.13.0-44-generic`

We are assuming that any other kernel images newer than this can go:

So starting with `3.13.0-45-generic`

    $ sudo su 
    # apt-get purge linux-image-3.13.0-45-generic
    # exit

 

Running this command produced the following:  

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet de pendencies:
     linux-headers-generic : Depends: linux-headers-3.13.0-151-generic but it is not going to be installed
     linux-image-extra-3.13.0-45-generic : Depends: linux-image-3.13.0-45-generic but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    root@Gary-PC:/home/gary# 

I ran `apt-get -f install` but not sure if I should now run `apt-get autoremove` - I guess there will be a net gain of disk space that will accommodate the 13.5MB need for the new installations? 

    root@Gary-PC:/home/gary# apt-get -f install
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following packages were automatically installed and are no longer required:
      libbonobo2-0 libbonobo2-common libgconf2-4 libgnome2-0 libgnome2-bin
      libgnome2-common libgnomevfs2-0 libgnomevfs2-common libidl-common libidl0
      libntdb1 liborbit-2-0 liborbit2 libqpdf13 linux-headers-3.13.0-105
      linux-headers-3.13.0-105-generic linux-headers-3.13.0-116
      linux-headers-3.13.0-116-generic linux-image-3.13.0-105-generic
      linux-image-3.13.0-116-generic linux-image-extra-3.13.0-105-generic
      linux-image-extra-3.13.0-116-generic python-ntdb
    Use 'apt-get autoremove' to remove them.
    The following extra packages will be installed:
      linux-headers-3.13.0-151-generic
    The following NEW packages will be installed:
      linux-headers-3.13.0-151-generic
    0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
    2 not fully installed or removed.
    Need to get 0 B/706 kB of archives.
    After this operation, 13.5 MB of additional disk space will be used.
    Do you want to continue? [Y/n] apt-get -f install

Then running this command:

    root@Gary-PC:/home/gary# apt-get autoremove
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these.
    The following packages have unmet dependencies:
     linux-headers-generic : Depends: linux-headers-3.13.0-151-generic but it is not installed
    E: Unmet dependencies. Try using -f.

...

    root@Gary-PC:/home/gary# apt-get -f install
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        Correcting dependencies... Done
        The following packages were automatically installed and are no longer required:
          libbonobo2-0 libbonobo2-common libgconf2-4 libgnome2-0 libgnome2-bin
          libgnome2-common libgnomevfs2-0 libgnomevfs2-common libidl-common libidl0
          libntdb1 liborbit-2-0 liborbit2 libqpdf13 linux-headers-3.13.0-105
          linux-headers-3.13.0-105-generic linux-headers-3.13.0-116
          linux-headers-3.13.0-116-generic linux-image-3.13.0-105-generic
          linux-image-3.13.0-116-generic linux-image-extra-3.13.0-105-generic
          linux-image-extra-3.13.0-116-generic python-ntdb
        Use 'apt-get autoremove' to remove them.
        The following extra packages will be installed:
          linux-headers-3.13.0-151-generic
        The following NEW packages will be installed:
          linux-headers-3.13.0-151-generic
        0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
        2 not fully installed or removed.
        Need to get 0 B/706 kB of archives.
        After this operation, 13.5 MB of additional disk space will be used.
        Do you want to continue? [Y/n] n
        Abort.


----------


    After this operation, 13.5 MB of additional disk space will be used.
    Do you want to continue? [Y/n] yes

    (Reading database ... 1223843 files and directories currently installed.)
    Preparing to unpack .../linux-headers-3.13.0-151 generic_3.13.0-151.201_amd64.deb ...
    Unpacking linux-headers-3.13.0-151-generic (3.13.0-151.201) ...
    dpkg: error processing archive /var/cache/apt/archives/linux-headers-3.13.0-151-generic_3.13.0-151.201_amd64.deb (--unpack):
    error creating symbolic link `./usr/src/linux-headers-3.13.0-151-generic/include/linux/if_arp.h': No space left on device
    No apport report written because the error message indicates a disk full error
          
    Errors were encountered while processing:
    /var/cache/apt/archives/linux-headers-3.13.0-151-generic_3.13.0-151.201_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    gary@Gary-PC:~$ 


 
Now confused. Any help appreciated.