I'm trying to remove old kernels on Ubuntu 17.10, but am being hit with an unmet dependencies error. My current kernel is linux 4.13.0-38-generic.
My output from dpkg -l | grep linux-image | awk '{print$2}
is this:
linux-image-4.13.0-36-generic
linux-image-4.13.0-37-generic
linux-image-4.13.0-38-generic
linux-image-4.13.0-39-generic
linux-image-extra-4.13.0-36-generic
linux-image-extra-4.13.0-37-generic
linux-image-extra-4.13.0-38-generic
linux-image-extra-4.13.0-39-generic
linux-image-extra-4.13.0-41-generic
linux-image-generic
When I try to remove older kernels (sudo apt-get purge linux-image-x.x.x-x-generic
), this is the error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
linux-image-extra-4.13.0-41-generic : Depends: linux-image-4.13.0-41-generic but it is not installed
linux-image-generic : Depends: linux-image-4.13.0-41-generic but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
To fix the broken dependencies, I use sudo apt --fix-broken install
, click Yes when asked whether I want to continue, and get this output:
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:
libqpdf18 linux-headers-4.13.0-37 linux-headers-4.13.0-37-generic
linux-image-4.13.0-37-generic linux-image-extra-4.13.0-37-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
linux-image-4.13.0-41-generic
Suggested packages:
fdutils linux-doc-4.13.0 | linux-source-4.13.0 linux-tools
The following NEW packages will be installed:
linux-image-4.13.0-41-generic
0 upgraded, 1 newly installed, 0 to remove and 15 not upgraded.
5 not fully installed or removed.
Need to get 0 B/20.9 MB of archives.
After this operation, 72.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 374331 files and directories currently installed.)
Preparing to unpack .../linux-image-4.13.0-41-generic_4.13.0-41.46_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
Done.
Unpacking linux-image-4.13.0-41-generic (4.13.0-41.46) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.13.0-41-generic_4.13.0-41.46_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.13.0-41-generic' to '/boot/vmlinuz-4.13.0-41-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
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.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.13.0-41-generic_4.13.0-41.46_amd64.deb
Output of uname -r
is: 4.13.0-38-generic
Output of df -h
is:
Filesystem Size Used Avail Use% Mounted on
udev 63G 0 63G 0% /dev
tmpfs 13G 2.7M 13G 1% /run
/dev/mapper/sdb2_crypt 1.9T 1004G 779G 57% /
tmpfs 63G 39M 63G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/nvme0n1p1 1.1T 472G 573G 46% /mnt/scratch
/dev/sdb1 231M 222M 0 100% /boot
/dev/md126p1 9.1T 3.0T 6.2T 33% /mnt/10TB
tmpfs 13G 84K 13G 1% /run/user/1001
tmpfs 13G 0 13G 0% /run/user/1004
No comments:
Post a Comment