5 votes

Impossible de supprimer les anciens noyaux

J'essaie de supprimer les anciennes versions du noyau pour pouvoir faire une mise à jour. La méthode que j'utilise est la suivante.

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

Chaque fois que je l'exécute, j'obtiens l'erreur suivante :

    <(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, donc ce que je comprends, c'est que ça me dit que je n'ai plus d'espace, ce que je sais. Je reçois aussi de temps en temps un message me demandant d'exécuter le programme ci-dessous pour résoudre mes erreurs, et à ce moment-là, je reçois à nouveau le message de manque d'espace.

sudo apt-get install -f

Tout ce que j'essaie me donne l'erreur "now space". Frustrant..... Merci pour votre aide.

Voici le résultat demandé, désolé

    /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

Voici l'erreur que je reçois lorsque j'essaie de purger selon le lien posté. BTW c'était le post d'orgions que j'ai essayé de suivre.

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

résultat de 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)

Résultats de 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.

Résultats de 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)

1voto

Parto Points 14406

Pour éviter les erreurs futures de type 'no space in boot/', installer ubuntu-tweak et utilisez son gardien pour faire des nettoyages fréquents de vos programmes en cache, des vieux noyaux, des programmes inutiles, etc.

Après l'installation, allez dans "concierge" et cochez la case "système" dans la barre latérale gauche, puis appuyez sur "nettoyer" en bas. Vérifiez l'image ci-dessous.

Ubuntu tweak showing janitor

0voto

precise Points 14840

Cette commande source :

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

que j'ai lancé vient de libérer 723 Mo de mon espace disque. Il vérifie la version actuelle du noyau que vous utilisez et supprime le reste.

SistemesEz.com

SystemesEZ est une communauté de sysadmins où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X