0

We're having some issue on a server where we can't install anything any more, see this example: (I get the same result when I run sudo apt-get autoremove)

root@Ubuntu-1604-xenial-64-minimal ~ # apt-get install unrar
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-image-extra-4.4.0-112-generic : Depends: linux-image-4.4.0-112-generic but it is not going to be installed
 linux-image-generic : Depends: linux-image-4.4.0-112-generic but it is not going to be installed
                       Recommends: thermald but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

When I then run apt-get -f install, I get the following

root@Ubuntu-1604-xenial-64-minimal ~ # apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  linux-image-4.4.0-112-generic
Suggested packages:
  fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
The following NEW packages will be installed:
  linux-image-4.4.0-112-generic
0 upgraded, 1 newly installed, 0 to remove and 182 not upgraded.
13 not fully installed or removed.
Need to get 0 B/21.9 MB of archives.
After this operation, 66.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 606222 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-112-generic_4.4.0-112.135_amd64.deb ...
Done.
Unpacking linux-image-4.4.0-112-generic (4.4.0-112.135) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-112-generic_4.4.0-112.135_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-4.4.0-112-generic' to '/boot/vmlinuz-4.4.0-112-generic.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-4.4.0-112-generic_4.4.0-112.135_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

And when I run df

root@Ubuntu-1604-xenial-64-minimal ~ # df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            126G     0  126G   0% /dev
tmpfs            26G  2.6G   23G  10% /run
/dev/md2        436G  192G  222G  47% /
tmpfs           126G     0  126G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           126G     0  126G   0% /sys/fs/cgroup
/dev/md1        488M  487M     0 100% /boot
tmpfs            26G     0   26G   0% /run/user/0
tmpfs            26G     0   26G   0% /run/user/1000

I've been reading several posts that match my issue here, but haven't been able to find a solution.

It seems like the /boot mount is full and therefore I can't install anything anymore, but I'm also not able to clean it. How do I got about this?

Running sudo dpkg --configure -a also throws gzip: stdout: No space left on device

EDIT

root@Ubuntu-1604-xenial-64-minimal /boot # ls -lah
total 478M
drwxr-xr-x  4 root root 5.0K Feb  1 16:21 .
drwxr-xr-x 25 root root 4.0K Feb  1 16:21 ..
-rw-r--r--  1 root root 1.2M Nov 10 22:41 abi-4.4.0-101-generic
-rw-r--r--  1 root root 1.2M Jun 14  2017 abi-4.4.0-81-generic
-rw-r--r--  1 root root 1.2M Jun 26  2017 abi-4.4.0-83-generic
-rw-r--r--  1 root root 1.2M Jul 18  2017 abi-4.4.0-87-generic
-rw-r--r--  1 root root 1.2M Aug  1  2017 abi-4.4.0-89-generic
-rw-r--r--  1 root root 1.2M Aug  8 15:58 abi-4.4.0-91-generic
-rw-r--r--  1 root root 1.2M Aug 10 13:02 abi-4.4.0-92-generic
-rw-r--r--  1 root root 1.2M Aug 12 01:40 abi-4.4.0-93-generic
-rw-r--r--  1 root root 1.2M Sep 12 19:59 abi-4.4.0-96-generic
-rw-r--r--  1 root root 1.2M Sep 19 22:29 abi-4.4.0-97-generic
-rw-r--r--  1 root root 1.2M Oct 10 18:19 abi-4.4.0-98-generic
-rw-r--r--  1 root root 187K Nov 10 22:41 config-4.4.0-101-generic
-rw-r--r--  1 root root 186K Jun 14  2017 config-4.4.0-81-generic
-rw-r--r--  1 root root 186K Jun 26  2017 config-4.4.0-83-generic
-rw-r--r--  1 root root 186K Jul 18  2017 config-4.4.0-87-generic
-rw-r--r--  1 root root 186K Aug  1  2017 config-4.4.0-89-generic
-rw-r--r--  1 root root 186K Aug  8 15:58 config-4.4.0-91-generic
-rw-r--r--  1 root root 186K Aug 10 13:02 config-4.4.0-92-generic
-rw-r--r--  1 root root 186K Aug 12 01:40 config-4.4.0-93-generic
-rw-r--r--  1 root root 187K Sep 12 19:59 config-4.4.0-96-generic
-rw-r--r--  1 root root 187K Sep 19 22:29 config-4.4.0-97-generic
-rw-r--r--  1 root root 187K Oct 10 18:19 config-4.4.0-98-generic
drwxr-xr-x  5 root root 1.0K Feb  1 16:12 grub
-rw-r--r--  1 root root 6.2M Feb  1 16:12 initrd.img-4.4.0-103-generic
-rw-r--r--  1 root root  34M Oct 26 01:33 initrd.img-4.4.0-79-generic
-rw-r--r--  1 root root  34M Oct 26 01:33 initrd.img-4.4.0-81-generic
-rw-r--r--  1 root root  34M Oct 26 01:33 initrd.img-4.4.0-83-generic
-rw-r--r--  1 root root  34M Oct 26 01:32 initrd.img-4.4.0-87-generic
-rw-r--r--  1 root root  34M Oct 26 01:32 initrd.img-4.4.0-89-generic
-rw-r--r--  1 root root  34M Oct 26 01:32 initrd.img-4.4.0-91-generic
-rw-r--r--  1 root root  34M Oct 26 01:32 initrd.img-4.4.0-92-generic
-rw-r--r--  1 root root  34M Oct 26 01:32 initrd.img-4.4.0-93-generic
-rw-r--r--  1 root root  34M Oct 26 01:32 initrd.img-4.4.0-96-generic
-rw-r--r--  1 root root  34M Oct 26 01:32 initrd.img-4.4.0-97-generic
drwx------  2 root root  12K Jan 25  2017 lost+found
-rw-------  1 root root 3.8M Nov 10 22:41 System.map-4.4.0-101-generic
-rw-------  1 root root 3.8M Jun 14  2017 System.map-4.4.0-81-generic
-rw-------  1 root root 3.8M Jun 26  2017 System.map-4.4.0-83-generic
-rw-------  1 root root 3.8M Jul 18  2017 System.map-4.4.0-87-generic
-rw-------  1 root root 3.8M Aug  1  2017 System.map-4.4.0-89-generic
-rw-------  1 root root 3.8M Aug  8 15:58 System.map-4.4.0-91-generic
-rw-------  1 root root 3.8M Aug 10 13:02 System.map-4.4.0-92-generic
-rw-------  1 root root 3.8M Aug 12 01:40 System.map-4.4.0-93-generic
-rw-------  1 root root 3.8M Sep 12 19:59 System.map-4.4.0-96-generic
-rw-------  1 root root 3.8M Sep 19 22:29 System.map-4.4.0-97-generic
-rw-------  1 root root 3.8M Oct 10 18:19 System.map-4.4.0-98-generic
-rw-------  1 root root 6.8M Nov 10 22:41 vmlinuz-4.4.0-101-generic
-rw-------  1 root root 6.8M Jun 14  2017 vmlinuz-4.4.0-81-generic
-rw-------  1 root root 6.8M Jun 26  2017 vmlinuz-4.4.0-83-generic
-rw-------  1 root root 6.8M Jul 18  2017 vmlinuz-4.4.0-87-generic
-rw-------  1 root root 6.8M Aug  1  2017 vmlinuz-4.4.0-89-generic
-rw-------  1 root root 6.8M Aug  8 15:58 vmlinuz-4.4.0-91-generic
-rw-------  1 root root 6.8M Aug 10 13:02 vmlinuz-4.4.0-92-generic
-rw-------  1 root root 6.8M Aug 12 01:40 vmlinuz-4.4.0-93-generic
-rw-------  1 root root 6.8M Sep 12 19:59 vmlinuz-4.4.0-96-generic
-rw-------  1 root root 6.8M Sep 19 22:29 vmlinuz-4.4.0-97-generic
-rw-------  1 root root 6.8M Oct 10 18:19 vmlinuz-4.4.0-98-generic

marked as duplicate by Charles Green, chili555, karel, muru, N0rbert Feb 1 '18 at 20:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Possible, but looking at that post I find it is not clear how I should apply this to my situation..? – Richard Feb 1 '18 at 15:10
  • Okay it is a duplicate of that one. Makes such a difference if you know the keywords you need to search for – Richard Feb 1 '18 at 15:21

Browse other questions tagged or ask your own question.