So, I tried to update my system with the following commands and encountered an error:
$ sudo apt-get update && sudo apt-get dist-upgrade
Hit:1 http://il.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://il.archive.ubuntu.com/ubuntu xenial-security InRelease
Hit:3 http://il.archive.ubuntu.com/ubuntu xenial-updates InRelease
Reading package lists... Done
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-77-generic : Depends: linux-image-4.4.0-77-generic but it is not installed
linux-image-generic : Depends: linux-image-4.4.0-77-generic but it is not installed
Recommends: thermald but it is not installed
E: Unmet dependencies. Try using -f.
It asks me to use apt-get -f install
, well..
$ sudo 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:
linux-headers-4.4.0-77 linux-headers-4.4.0-77-generic linux-image-4.4.0-77-generic linux-image-extra-4.4.0-77-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
linux-generic linux-headers-4.4.0-78 linux-headers-4.4.0-78-generic linux-headers-generic linux-image-4.4.0-77-generic linux-image-4.4.0-78-generic
linux-image-extra-4.4.0-78-generic linux-image-generic
Suggested packages:
fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
Recommended packages:
thermald
The following packages will be REMOVED:
linux-image-extra-4.4.0-70-generic
The following NEW packages will be installed:
linux-headers-4.4.0-78 linux-headers-4.4.0-78-generic linux-image-4.4.0-77-generic linux-image-4.4.0-78-generic linux-image-extra-4.4.0-78-generic
The following packages will be upgraded:
linux-generic linux-headers-generic linux-image-generic
3 upgraded, 5 newly installed, 1 to remove and 62 not upgraded.
12 not fully installed or removed.
Need to get 0 B/90.4 MB of archives.
After this operation, 211 MB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 415789 files and directories currently installed.)
Removing linux-image-extra-4.4.0-70-generic (4.4.0-70.91) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-70-generic /boot/vmlinuz-4.4.0-70-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-70-generic /boot/vmlinuz-4.4.0-70-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-70-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-70-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-70-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.4.0-70-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
And autoremove
:
$ sudo 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-image-extra-4.4.0-77-generic : Depends: linux-image-4.4.0-77-generic but it is not installed
linux-image-generic : Depends: linux-image-4.4.0-77-generic but it is not installed
Recommends: thermald but it is not installed
E: Unmet dependencies. Try using -f.
And now I'm lost. I have no idea how it happened (I'm not the only one that uses this server) and I don't know how to troubleshoot this issue. The output doesn't mean much as far as I can read either.
What should I do now?
Edit: df -h
Filesystem Size Used Avail Use% Mounted on
udev 23G 0 23G 0% /dev
tmpfs 4.6G 458M 4.1G 10% /run
/dev/mapper/gil--games--vg-root 114G 104G 5.1G 96% /
tmpfs 23G 4.1M 23G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 23G 0 23G 0% /sys/fs/cgroup
/dev/xvda1 472M 471M 0 100% /boot
tmpfs 4.6G 0 4.6G 0% /run/user/1003
tmpfs 4.6G 0 4.6G 0% /run/user/1007
tmpfs 4.6G 0 4.6G 0% /run/user/0
tmpfs 4.6G 0 4.6G 0% /run/user/1001
tmpfs 4.6G 0 4.6G 0% /run/user/1014
df -h
to your question? – pizzapants184 May 22 '17 at 23:38du -had 1 /boot | sort -h
to your question so we can se what files are taking the most space? – pizzapants184 May 22 '17 at 23:58rm
command to fix your boot partition by removing old kernels – answerSeeker May 23 '17 at 00:03