在 /boot 中释放更多空间?

在 /boot 中释放更多空间?

我是Linux新手。

我尝试了以下命令:

sudo bootnukem

sudo apt-get autoremove

dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e uname -r | cut -f1,2 -d"-" | grep -e '[0-9]' | xargs sudo apt-get -y purge

问题是

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-generic-hwe-16.04-edge : Depends: linux-image-4.15.0-43-generic but it is not installed
 linux-image-virtual-hwe-16.04-edge : Depends: linux-image-4.15.0-43-generic but it is not installed
 linux-modules-extra-4.15.0-43-generic : Depends: linux-image-4.15.0-43-generic but it is not installed or
                                                  linux-image-unsigned-4.15.0-43-generic but it is not installed
E: Unmet dependencies. Try using -f.

尝试安装时失败,没有空间问题。

:~/bootnukem$ sudo 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.15.0-43-generic
    Suggested packages:
      fdutils linux-hwe-tools
    The following NEW packages will be installed:
      linux-image-4.15.0-43-generic
    0 upgraded, 1 newly installed, 0 to remove and 181 not upgraded.
    7 not fully installed or removed.
    Need to get 0 B/7.898 kB of archives.
    After this operation, 8.141 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    (Reading database ... 511782 files and directories currently installed.)
    Preparing to unpack .../linux-image-4.15.0-43-generic_4.15.0-43.46~16.04.1_amd64.deb ...
    Unpacking linux-image-4.15.0-43-generic (4.15.0-43.46~16.04.1) ...
    dpkg: error processing archive /var/cache/apt/archives/linux-image-4.15.0-43-generic_4.15.0-43.46~16.04.1_amd64.deb (--unpack):
     cannot copy extracted data for './boot/vmlinuz-4.15.0-43-generic' to '/boot/vmlinuz-4.15.0-43-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)
    /var/lib/dpkg/tmp.ci/postrm ... removing pending trigger
    Errors were encountered while processing:
     /var/cache/apt/archives/linux-image-4.15.0-43-generic_4.15.0-43.46~16.04.1_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

我的版本

 uname -a
Linux NB128 4.15.0-39-generic #42~16.04.1-Ubuntu SMP Wed Oct 24 17:09:54 UTC 2018 x86_64 x86_64 x86_64 GNU/Linu

任何帮助是极大的赞赏。

答案1

尝试使用“dpkg --purge package-name”。删除软件包以释放空间后,您可以继续再次使用 apt-get 命令。

相关内容