이전 Linux 커널을 제거할 수 없으며 디스크 공간이 없습니다.

이전 Linux 커널을 제거할 수 없으며 디스크 공간이 없습니다.

시스템을 업그레이드하고 싶습니다.

apt update

그 다음에:

apt upgrade -y

이 오류가 발생했습니다.

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-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

그래서 나는 다음을 입력합니다:

Suggested packages:
  linux-doc-4.9 debian-kernel-handbook
The following NEW packages will be installed:
  linux-image-4.9.0-5-amd64
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
48 not fully installed or removed.
Need to get 38.8 MB of archives.
After this operation, 190 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://security-cdn.debian.org stretch/updates/main amd64 linux-image-4.9.0-5-amd64 amd64 4.9.65-3+deb9u2 [38.8 MB]
Fetched 38.8 MB in 7s (4,995 kB/s)
(Reading database ... 142235 files and directories currently installed.)
Preparing to unpack .../linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb ...
Unpacking linux-image-4.9.0-5-amd64 (4.9.65-3+deb9u2) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-4.9.0-5-amd64' to '/boot/vmlinuz-4.9.0-5-amd64.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-4.9.0-5-amd64_4.9.65-3+deb9u2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

그러나 같은 오류가 발생했습니다. 이 명령으로는 이전 커널을 제거할 수 없습니다.

dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge

같은 오류 때문에:

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-amd64 : Depends: linux-image-4.9.0-5-amd64 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

관련 정보