質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Q&A

解決済

1回答

2973閲覧

UbuntuでのDISK FULLについて

kokawa2003

総合スコア217

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

0グッド

0クリップ

投稿2018/02/16 09:15

ちょっとここに聞くのが適当なのか恐縮なのですが困っているので聞きます
会社のUbuntu16.04がUpdateできないというので調べて見ました。

lang

1$ sudo apt update 2(略) 3$ sudo apt upgrade 4Reading package lists... Done 5Building dependency tree 6Reading state information... Done 7You might want to run 'apt-get -f install' to correct these. 8The following packages have unmet dependencies: 9 linux-image-extra-4.4.0-116-generic : Depends: linux-image-4.4.0-116-generic but it is not installed 10 linux-image-extra-4.4.0-97-generic : Depends: linux-image-4.4.0-97-generic but it is not installed 11 linux-image-generic : Depends: linux-image-4.4.0-116-generic but it is not installed 12 Recommends: thermald but it is not installed 13E: Unmet dependencies. Try using -f.

となります。
そこで

lang

1$ sudo apt-get -f install 2Reading package lists... Done 3Building dependency tree 4Reading state information... Done 5Correcting dependencies... Done 6The following additional packages will be installed: 7 linux-image-4.4.0-116-generic linux-image-4.4.0-97-generic 8Suggested packages: 9 fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools 10 linux-headers-4.4.0-97-generic 11The following NEW packages will be installed: 12 linux-image-4.4.0-116-generic linux-image-4.4.0-97-generic 130 upgraded, 2 newly installed, 0 to remove and 140 not upgraded. 1433 not fully installed or removed. 15Need to get 0 B/80.0 MB of archives. 16After this operation, 135 MB of additional disk space will be used. 17Do you want to continue? [Y/n] y 18(Reading database ... 430450 files and directories currently installed.) 19Preparing to unpack .../linux-image-4.4.0-116-generic_4.4.0-116.140_amd64.deb ... 20Done. 21Unpacking linux-image-4.4.0-116-generic (4.4.0-116.140) ... 22dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-116-generic_4.4.0-116.140_amd64.deb (--unpack): 23 cannot copy extracted data for './boot/vmlinuz-4.4.0-116-generic' to '/boot/vmlinuz-4.4.0-116-generic.dpkg-new': failed to write (No space left on device) 24No apport report written because the error message indicates a disk full error 25 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) 26Examining /etc/kernel/postrm.d . 27run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic 28run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic 29Preparing to unpack .../linux-image-4.4.0-97-generic_4.4.0-97.120_amd64.deb ... 30Done. 31Unpacking linux-image-4.4.0-97-generic (4.4.0-97.120) ... 32dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-97-generic_4.4.0-97.120_amd64.deb (--unpack): 33 cannot copy extracted data for './boot/vmlinuz-4.4.0-97-generic' to '/boot/vmlinuz-4.4.0-97-generic.dpkg-new': failed to write (No space left on device) 34No apport report written because the error message indicates a disk full error 35 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) 36Examining /etc/kernel/postrm.d . 37run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-97-generic /boot/vmlinuz-4.4.0-97-generic 38run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-97-generic /boot/vmlinuz-4.4.0-97-generic 39Errors were encountered while processing: 40 /var/cache/apt/archives/linux-image-4.4.0-116-generic_4.4.0-116.140_amd64.deb 41 /var/cache/apt/archives/linux-image-4.4.0-97-generic_4.4.0-97.120_amd64.deb 42E: Sub-process /usr/bin/dpkg returned an error code (1)

となります。DISLL FULLらしい。
そこで調べた。

lang

1 2$ df -h 3Filesystem Size Used Avail Use% Mounted on 4udev 981M 0 981M 0% /dev 5tmpfs 201M 21M 180M 11% /run 6/dev/mapper/novius--morisawa--vg-root 18G 8.9G 7.4G 55% / 7tmpfs 1001M 0 1001M 0% /dev/shm 8tmpfs 5.0M 0 5.0M 0% /run/lock 9tmpfs 1001M 0 1001M 0% /sys/fs/cgroup 10/dev/sda1 472M 466M 0 100% /boot 11tmpfs 201M 0 201M 0% /run/user/1000

となる。これからするとNo space left on deviceとは
/boot のあきがないのをさすらしい。
そこでカーネルパッケージを削除したいとおもったのでまず何が入っているかみた。

lang

1 2$ dpkg -l|grep linux-image 3rc linux-image-4.4.0-21-generic 4.4.0-21.37 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 4ii linux-image-4.4.0-77-generic 4.4.0-77.98 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 5ii linux-image-4.4.0-78-generic 4.4.0-78.99 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 6ii linux-image-4.4.0-79-generic 4.4.0-79.100 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 7ii linux-image-4.4.0-81-generic 4.4.0-81.104 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 8ii linux-image-4.4.0-83-generic 4.4.0-83.106 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 9ii linux-image-4.4.0-87-generic 4.4.0-87.110 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 10ii linux-image-4.4.0-89-generic 4.4.0-89.112 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 11ii linux-image-4.4.0-91-generic 4.4.0-91.114 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 12ii linux-image-4.4.0-92-generic 4.4.0-92.115 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 13iF linux-image-4.4.0-93-generic 4.4.0-93.116 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 14iF linux-image-4.4.0-96-generic 4.4.0-96.119 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP 15iU linux-image-extra-4.4.0-116-generic 4.4.0-116.140 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 16rc linux-image-extra-4.4.0-21-generic 4.4.0-21.37 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 17ii linux-image-extra-4.4.0-77-generic 4.4.0-77.98 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 18ii linux-image-extra-4.4.0-78-generic 4.4.0-78.99 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 19ii linux-image-extra-4.4.0-79-generic 4.4.0-79.100 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 20ii linux-image-extra-4.4.0-81-generic 4.4.0-81.104 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 21ii linux-image-extra-4.4.0-83-generic 4.4.0-83.106 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 22ii linux-image-extra-4.4.0-87-generic 4.4.0-87.110 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 23ii linux-image-extra-4.4.0-89-generic 4.4.0-89.112 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 24ii linux-image-extra-4.4.0-91-generic 4.4.0-91.114 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 25iF linux-image-extra-4.4.0-92-generic 4.4.0-92.115 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 26iU linux-image-extra-4.4.0-93-generic 4.4.0-93.116 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 27iU linux-image-extra-4.4.0-96-generic 4.4.0-96.119 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 28rH linux-image-extra-4.4.0-97-generic 4.4.0-97.120 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP 29iU linux-image-generic 4.4.0.116.122 amd64 Generic Linux kernel image

で今のカーネルもみた。

lang

1 2$ uname -a 3Linux novius-morisawa 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

だから
4.4.0-77から8?のやつを軒並み削除したいのですが

lang

1sudo apt -f remove linux-image-4.4.0-77-generic 2Reading package lists... Done 3Building dependency tree 4Reading state information... Done 5You might want to run 'apt-get -f install' to correct these: 6The following packages have unmet dependencies: 7 linux-image-extra-4.4.0-116-generic : Depends: linux-image-4.4.0-116-generic but it is not going to be installed 8 linux-image-extra-4.4.0-77-generic : Depends: linux-image-4.4.0-77-generic but it is not going to be installed 9 linux-image-generic : Depends: linux-image-4.4.0-116-generic but it is not going to be installed 10 Recommends: thermald but it is not going to be installed 11E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

と先にinstallしろと拒否られます。
そこで
dpkg -r で削除するのが良いのでしょうか?
それとももっと決まったやり方がありますか?
お教えください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

その後で
dpkg -r もうまく行かず、結局/boot からrmでファイルを削除しました。

投稿2018/02/16 11:19

kokawa2003

総合スコア217

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問