web-dev-qa-db-ja.com

古いカーネルを削除できません

アップグレードできるように、古いカーネルバージョンを削除しようとしています。私が使用している方法は以下の通りです。

Sudo apt-get purge linux-image-x.y.z-server

実行するたびに次のエラーが発生します。

    <(Reading database ... 516009 files and directories currently installed.)
Unpacking linux-image-3.0.0-32-server (from .../linux-image-3.0.0-32-server_3.0.0-32.51_AMD64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-3.0.0-32-server_3.0.0-32.51_AMD64.deb (--unpack):
 failed in write on buffer copy for backend dpkg-deb during `./boot/System.map-3.0.0-32-server': 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 3.0.0-32-server /boot/vmlinuz-3.0.0-32-server
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.0.0-32-server /boot/vmlinuz-3.0.0-32-server
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.0.0-32-server_3.0.0-32.51_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

わかりましたので、私が得るのは、私が知っているスペースが足りないと言っていることです。また、以下を実行してエラーを解決するメッセージが時々表示され、その時点で再びスペースメッセージが表示されます。

Sudo apt-get install -f

私がしようとするすべてが今私にスペースエラーを与えます。欲求不満.....助けてくれてありがとう。

要求された出力は次のとおりです。ごめんなさい

    /dev/mapper/wikisrvr-root
                       48G  6.4G   40G  14% /
udev                  996M  4.0K  996M   1% /dev
tmpfs                 402M  952K  401M   1% /run
none                  5.0M     0  5.0M   0% /run/lock
none                 1005M  188K 1004M   1% /run/shm
/dev/sda1             228M  227M     0 100% /boot

これは、投稿されたリンクに従ってパージしようとしたときに表示されるエラーです。ところで、それは私が従おうとしたorgionsの投稿でした。

build@wikisrvr:~$ Sudo apt-get purge linux-image-3.0.0-12-server
[Sudo] password for build: 
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-server : Depends: linux-image-3.0.0-32-server but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

sudo apt-get -f installの結果

build@wikisrvr:~$ Sudo apt-get -f install
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:
  linux-headers-3.0.0-26-generic linux-headers-3.0.0-20-server
  linux-headers-3.0.0-24-server linux-headers-3.0.0-19-server ubufox
  linux-headers-3.0.0-12 linux-headers-3.0.0-20 linux-headers-3.0.0-21
  linux-headers-3.0.0-16 linux-headers-3.0.0-22 linux-headers-3.0.0-17
  linux-headers-3.0.0-24 linux-headers-3.0.0-19 linux-headers-3.0.0-30
  linux-headers-3.0.0-25 linux-headers-3.0.0-26 linux-headers-3.0.0-21-generic
  linux-headers-3.0.0-16-generic linux-headers-3.0.0-12-server
  linux-headers-3.0.0-24-generic linux-headers-3.0.0-19-generic
  linux-headers-3.0.0-21-server linux-headers-3.0.0-30-server
  linux-headers-3.0.0-25-server linux-headers-3.0.0-22-generic
  linux-headers-3.0.0-17-generic linux-headers-3.0.0-22-server
  linux-headers-3.0.0-17-server linux-headers-3.0.0-30-generic
  linux-headers-3.0.0-25-generic linux-headers-3.0.0-26-server
  linux-headers-3.0.0-20-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-image-3.0.0-32-server
Suggested packages:
  fdutils linux-doc-3.0.0 linux-source-3.0.0 linux-tools
The following NEW packages will be installed:
  linux-image-3.0.0-32-server
0 upgraded, 1 newly installed, 0 to remove and 127 not upgraded.
12 not fully installed or removed.
Need to get 0 B/37.3 MB of archives.
After this operation, 150 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 516009 files and directories currently installed.)
Unpacking linux-image-3.0.0-32-server (from .../linux-image-3.0.0-32-server_3.0.0-32.51_AMD64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-3.0.0-32-server_3.0.0-32.51_AMD64.deb (--unpack):
 failed in write on buffer copy for backend dpkg-deb during `./boot/System.map-3.0.0-32-server': 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 3.0.0-32-server /boot/vmlinuz-3.0.0-32-server
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.0.0-32-server /boot/vmlinuz-3.0.0-32-server
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.0.0-32-server_3.0.0-32.51_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Sugo apt-get autoremoveの結果

build@wikisrvr:~$ 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-server : Depends: linux-image-3.0.0-32-server but it is not installed
E: Unmet dependencies. Try using -f.

Sudo apt-get autoremove -fの結果

build@wikisrvr:~$ Sudo apt-get autoremove -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-image-3.0.0-32-server
Suggested packages:
  fdutils linux-doc-3.0.0 linux-source-3.0.0 linux-tools
The following packages will be REMOVED:
  linux-headers-3.0.0-12 linux-headers-3.0.0-12-server linux-headers-3.0.0-16
  linux-headers-3.0.0-16-generic linux-headers-3.0.0-17
  linux-headers-3.0.0-17-generic linux-headers-3.0.0-17-server
  linux-headers-3.0.0-19 linux-headers-3.0.0-19-generic
  linux-headers-3.0.0-19-server linux-headers-3.0.0-20
  linux-headers-3.0.0-20-generic linux-headers-3.0.0-20-server
  linux-headers-3.0.0-21 linux-headers-3.0.0-21-generic
  linux-headers-3.0.0-21-server linux-headers-3.0.0-22
  linux-headers-3.0.0-22-generic linux-headers-3.0.0-22-server
  linux-headers-3.0.0-24 linux-headers-3.0.0-24-generic
  linux-headers-3.0.0-24-server linux-headers-3.0.0-25
  linux-headers-3.0.0-25-generic linux-headers-3.0.0-25-server
  linux-headers-3.0.0-26 linux-headers-3.0.0-26-generic
  linux-headers-3.0.0-26-server linux-headers-3.0.0-30
  linux-headers-3.0.0-30-generic linux-headers-3.0.0-30-server ubufox
The following NEW packages will be installed:
  linux-image-3.0.0-32-server
0 upgraded, 1 newly installed, 32 to remove and 127 not upgraded.
12 not fully installed or removed.
Need to get 0 B/37.3 MB of archives.
After this operation, 1,029 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 516009 files and directories currently installed.)
Unpacking linux-image-3.0.0-32-server (from .../linux-image-3.0.0-32-server_3.0.0-32.51_AMD64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-3.0.0-32-server_3.0.0-32.51_AMD64.deb (--unpack):
 failed in write on buffer copy for backend dpkg-deb during `./boot/System.map-3.0.0-32-server': 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 3.0.0-32-server /boot/vmlinuz-3.0.0-32-server
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.0.0-32-server /boot/vmlinuz-3.0.0-32-server
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.0.0-32-server_3.0.0-32.51_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
5
user2993692

将来の「boot /にスペースがありません」エラーを防ぐには、 install ubuntu-Tweak を使用し、管理プログラムを使用して、キャッシュプログラム、古いカーネル、不要なプログラムなどを頻繁にクリーンアップします。

インストール後、「janitor」に進み、左側のサイドバーの「システム」チェックボックスをオンにして、下部の「クリーン」を押します。以下の画像を確認してください。

Ubuntu Tweak showing janitor

1
Parto

このコマンド ソース

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

723 MBのディスク領域を解放して実行したこと。これは、使用している現在のカーネルリリースをチェックし、残りを削除します。

0
precise