Não é possível remover kernels antigos [duplicados]

5

Estou tentando remover versões antigas do kernel para poder atualizar. O método que estou usando está abaixo.

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

Toda vez que eu executo, recebo o seguinte erro:

    <(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)

Ok, então o que eu recebo é que isso está me dizendo que estou sem espaço que eu conheço. Eu também recebo uma mensagem de vez em quando sobre como executar o arquivo abaixo para resolver meus erros, quando eu recebo novamente a mensagem de espaço agora.

sudo apt-get install -f

Tudo que eu tento me dá o erro de espaço agora. Frustrante ..... Obrigado pela ajuda pessoal.

Aqui está a saída solicitada, desculpe

    /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

Este é o erro que recebo quando tento depurar de acordo com o link publicado. BTW, que foi o post de orgions que tentei seguir.

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).

resultz do 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)

Resultados do 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.

Resultados do 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)
    
por user2993692 10.02.2014 / 20:44

2 respostas

1

Para evitar erros futuros de 'sem espaço na inicialização', instale o ubuntu-tweak e usar o zelador para fazer limpezas freqüentes de seus programas em cache, kernels antigos, programas desnecessários, etc.

Após a instalação, vá para "janitor" e marque a caixa de seleção "system" na barra lateral esquerda e pressione "clean" na parte inferior. Confira a imagem abaixo.

    
por Parto 10.02.2014 / 21:56
0

Este comando source :

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

que eu corri apenas liberou 723 MB do meu espaço em disco. Isso irá verificar a versão atual do kernel que você está usando e removerá o resto.

    
por precise 11.02.2014 / 19:43