1

I get the below error when I try to install updates using Software Updater:

Not enough free disk space
The upgrade needs a total of 81.3 M free space on disk '/boot'.
Please free at least an additional 15.9 M of disk space on '/boot'.
Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.

What should I do?

firmtechnologies@FirmTechnologies:~$ (ls -l /boot)
total 155801
-rw-r--r-- 1 root root  1158016 May  3 01:30 abi-3.13.0-24-generic
-rw-r--r-- 1 root root  1161713 May  8 01:31 abi-3.13.0-26-generic
-rw-r--r-- 1 root root  1161713 May 15 20:07 abi-3.13.0-27-generic
-rw-r--r-- 1 root root  1161764 Jun  4 22:57 abi-3.13.0-29-generic
-rw-r--r-- 1 root root   165510 May  3 01:30 config-3.13.0-24-generic
-rw-r--r-- 1 root root   165538 May  8 01:31 config-3.13.0-26-generic
-rw-r--r-- 1 root root   165521 May 15 20:07 config-3.13.0-27-generic
-rw-r--r-- 1 root root   165544 Jun  4 22:57 config-3.13.0-29-generic
drwxr-xr-x 5 root root     1024 Jun  6 14:31 grub
-rw-r--r-- 1 root root 29091568 May  7 21:31 initrd.img-3.13.0-24-generic
-rw-r--r-- 1 root root 29094684 May 12 12:24 initrd.img-3.13.0-26-generic
-rw-r--r-- 1 root root 29095678 May 18 10:57 initrd.img-3.13.0-27-generic
-rw-r--r-- 1 root root 29093700 Jun  6 14:32 initrd.img-3.13.0-29-generic
drwx------ 2 root root    12288 Apr 30 17:11 lost+found
-rw-r--r-- 1 root root   176500 Mar 12 13:31 memtest86+.bin
-rw-r--r-- 1 root root   178176 Mar 12 13:31 memtest86+.elf
-rw-r--r-- 1 root root   178680 Mar 12 13:31 memtest86+_multiboot.bin
-rw------- 1 root root  3372643 May  3 01:30 System.map-3.13.0-24-generic
-rw------- 1 root root  3377429 May  8 01:31 System.map-3.13.0-26-generic
-rw------- 1 root root  3377429 May 15 20:07 System.map-3.13.0-27-generic
-rw------- 1 root root  3378267 Jun  4 22:57 System.map-3.13.0-29-generic
-rw------- 1 root root  5776416 May  3 01:30 vmlinuz-3.13.0-24-generic
-rw------- 1 root root  5790912 May  8 01:30 vmlinuz-3.13.0-26-generic
-rw------- 1 root root  5790912 May 15 20:07 vmlinuz-3.13.0-27-generic
-rw------- 1 root root  5792544 Jun  4 22:57 vmlinuz-3.13.0-29-generic
karel
  • 122,292
  • 133
  • 301
  • 332
FirmTech
  • 129
  • 3
  • 12

3 Answers3

2

Remove old kernels

Run this command in a Terminal:

sudo apt-get remove $(dpkg --get-selections | awk '{ if($2 == "install") { print($1); } }' | grep -P '^linux-(headers|image)-(?!generic)' | grep -v "`uname -r | grep -oP '[^-]+-\d+'`")

Example output

This will attempt to remove all kernels from your system except the one you are using right now.

After reviewing the list confirm by pressing enter.
DO NOT CONTINUE IF IT SAYS SOMETHING ABOUT UNSATISFIED DEPENDENCIES!

As you can see in the screenshot this would free up about 1GB of space... all of which resides in the /boot partition!

ntninja
  • 736
0

Free some space for the updates like delete the temporary files form system and remove unwanted package’s installed on system if you are using dual boot then please ensure that you have given enough space for Ubuntu installation

try using sudo apt-get install bleachbit

Chinmaya B
  • 7,022
  • 7
  • 27
  • 43
0

I finally got it to work following Alexander255 's code but sudo apt-get remove was duplicated so i removed one of them and use the code as stated below:

sudo apt-get remove $(dpkg --get-selections | awk '{ if($2 == "install") { print($1); } }' | grep -P '^linux-(headers|image)-(?!generic)' | grep -v "uname -r | grep -oP '[^-]+-\d+'")

and it worked perfectly. Thanks so much.

FirmTech
  • 129
  • 3
  • 12