由于磁盘空间不足,无法再运行 apt-get install

由于磁盘空间不足,无法再运行 apt-get install

我们在服务器上遇到一些问题,无法再安装任何东西,请参见以下示例:(运行时我得到相同的结果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).

当我运行时apt-get -f install,我得到以下信息

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)

当我跑步的时候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

我已经阅读了几篇与我的问题相关的帖子,但还是没能找到解决方案。

看起来/boot支架已经满了,所以我无法再安装任何东西,但我也无法清理它。我该怎么做?

跑步sudo dpkg --configure -a也会引发gzip: stdout: No space left on device

编辑

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

相关内容