0

My /boot is at 100%. When I run aptitude search ~ilinux-image I'm getting loads of unused images. When I try to delete one of them (after checking which one is currently in use by doing uname -r), e.g apt-get autoremove linux-image-3.2.0-44-generic I get:

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-generic : Depends: linux-headers-generic (= 3.2.0.51.61) but 3.2.0.54.64 is to be installed
 linux-server : Depends: linux-headers-server (= 3.2.0.51.61) but 3.2.0.54.64 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

And running apt-get -f install throws No space left on device. I've also tried doing apt-get purge but I am getting the same thing.

Output of df -h and dpkg -l linux-*.:

root@hb2088:/srv/www# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       9.4G  3.0G  6.0G  34% /
udev            301M  4.0K  301M   1% /dev
tmpfs           124M  228K  124M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            309M     0  309M   0% /run/shm
/dev/sda1        92M   91M     0 100% /boot
root@hb2088:/srv/www# dpkg -l linux-*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                 Version                                              Description
+++-====================================================-====================================================-========================================================================================================================
un  linux-doc-3.2.0                                      <none>                                               (no description available)
ii  linux-firmware                                       1.79.6                                               Firmware for Linux kernel drivers
iU  linux-generic                                        3.2.0.51.61                                          Complete Generic Linux kernel
un  linux-headers                                        <none>                                               (no description available)
un  linux-headers-3                                      <none>                                               (no description available)
un  linux-headers-3.0                                    <none>                                               (no description available)
ii  linux-headers-3.2.0-44                               3.2.0-44.69                                          Header files related to Linux kernel version 3.2.0
ii  linux-headers-3.2.0-44-generic                       3.2.0-44.69                                          Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii  linux-headers-3.2.0-45                               3.2.0-45.70                                          Header files related to Linux kernel version 3.2.0
ii  linux-headers-3.2.0-45-generic                       3.2.0-45.70                                          Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii  linux-headers-3.2.0-48                               3.2.0-48.74                                          Header files related to Linux kernel version 3.2.0
ii  linux-headers-3.2.0-48-generic                       3.2.0-48.74                                          Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii  linux-headers-3.2.0-51                               3.2.0-51.77                                          Header files related to Linux kernel version 3.2.0
ii  linux-headers-3.2.0-51-generic                       3.2.0-51.77                                          Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
ii  linux-headers-3.2.0-52                               3.2.0-52.78                                          Header files related to Linux kernel version 3.2.0
ii  linux-headers-3.2.0-52-generic                       3.2.0-52.78                                          Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
iU  linux-headers-3.2.0-54                               3.2.0-54.82                                          Header files related to Linux kernel version 3.2.0
iU  linux-headers-3.2.0-54-generic                       3.2.0-54.82                                          Linux kernel headers for version 3.2.0 on 64 bit x86 SMP
iU  linux-headers-generic                                3.2.0.54.64                                          Generic Linux kernel headers
iU  linux-headers-server                                 3.2.0.54.64                                          Linux kernel headers on Server Equipment.
un  linux-image                                          <none>                                               (no description available)
un  linux-image-3.0                                      <none>                                               (no description available)
ii  linux-image-3.2.0-44-generic                         3.2.0-44.69                                          Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-45-generic                         3.2.0-45.70                                          Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-48-generic                         3.2.0-48.74                                          Linux kernel image for version 3.2.0 on 64 bit x86 SMP
iF  linux-image-3.2.0-51-generic                         3.2.0-51.77                                          Linux kernel image for version 3.2.0 on 64 bit x86 SMP
iF  linux-image-3.2.0-52-generic                         3.2.0-52.78                                          Linux kernel image for version 3.2.0 on 64 bit x86 SMP
in  linux-image-3.2.0-54-generic                         <none>                                               (no description available)
iU  linux-image-generic                                  3.2.0.51.61                                          Generic Linux kernel image
iU  linux-image-server                                   3.2.0.51.61                                          Linux kernel image on Server Equipment.
un  linux-initramfs-tool                                 <none>                                               (no description available)
un  linux-kernel-headers                                 <none>                                               (no description available)
un  linux-kernel-log-daemon                              <none>                                               (no description available)
ii  linux-libc-dev                                       3.2.0-52.78                                          Linux Kernel Headers for development
un  linux-restricted-common                              <none>                                               (no description available)
iU  linux-server                                         3.2.0.51.61                                          Complete Linux kernel on Server Equipment.
un  linux-source-3.2.0                                   <none>                                               (no description available)
un  linux-tools                                          <none>                                               (no description available)

Output of du -sh /boot/*:

root@hb2088:~# du -sh /boot/*
781K    /boot/abi-3.2.0-44-generic
781K    /boot/abi-3.2.0-45-generic
781K    /boot/abi-3.2.0-48-generic
781K    /boot/abi-3.2.0-51-generic
781K    /boot/abi-3.2.0-52-generic
139K    /boot/config-3.2.0-44-generic
139K    /boot/config-3.2.0-45-generic
139K    /boot/config-3.2.0-48-generic
139K    /boot/config-3.2.0-51-generic
139K    /boot/config-3.2.0-52-generic
1.6M    /boot/grub
14M /boot/initrd.img-3.2.0-44-generic
14M /boot/initrd.img-3.2.0-45-generic
14M /boot/initrd.img-3.2.0-48-generic
12K /boot/lost+found
174K    /boot/memtest86+.bin
176K    /boot/memtest86+_multiboot.bin
2.8M    /boot/System.map-3.2.0-44-generic
2.8M    /boot/System.map-3.2.0-45-generic
2.8M    /boot/System.map-3.2.0-48-generic
2.8M    /boot/System.map-3.2.0-51-generic
2.8M    /boot/System.map-3.2.0-52-generic
4.8M    /boot/vmlinuz-3.2.0-44-generic
4.8M    /boot/vmlinuz-3.2.0-45-generic
4.8M    /boot/vmlinuz-3.2.0-48-generic
4.8M    /boot/vmlinuz-3.2.0-51-generic
4.8M    /boot/vmlinuz-3.2.0-52-generic
  • I've tried purge. It didn't work. – uvasal Oct 20 '13 at 17:53
  • @Braiam: Edited my question – uvasal Oct 20 '13 at 18:16
  • output of du -sh /boot/* – Jacob Minshall Oct 20 '13 at 18:22
1

You should remove the kernels using this command line:

sudo dpkg -r linux-generic linux-server
sudo apt-get autoremove --purge linux-image-3.2.0-44-generic linux-image-3.2.0-45-generic linux-image-3.2.0-48-generic linux-image-3.2.0-51-generic
sudo apt-get install linux-generic

That would take care of the kernels cluttering your /boot. You should also probably remove the other linux-headers-* packages too.

  • That doesn't work either. I get the same output as above. – uvasal Oct 20 '13 at 21:30
  • How do I do that? I tried both autoremove and purge but both give the same output as above. – uvasal Oct 20 '13 at 21:47
  • Removing linux-server and linux-generic worked. But after running your command I still get "no space available on disk". Now the /boot is at 96%, so I tried installing the package I wanted to install and it's giving me Errors were encountered while processing: linux-image-3.2.0-52-generic – uvasal Oct 20 '13 at 22:02
  • I did. And it gave me "no space available on disk". I took out linux-image-3.2.0-48-generic because that is the one I am using (according to uname -r). Should I not have done that? – uvasal Oct 20 '13 at 22:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.