web-dev-qa-db-fra.com

Impossible de supprimer les anciens noyaux

J'essaie de supprimer les anciennes versions du noyau pour pouvoir effectuer la mise à niveau. La méthode que j'utilise est ci-dessous.

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

Chaque fois que je l'exécute, l'erreur suivante apparaît:

    <(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, alors ce que je comprends, c’est que je sais que je suis hors de l’espace. Je reçois également un message de temps à autre sur l'exécution du programme ci-dessous pour résoudre mes erreurs, point auquel je reçois à nouveau le message d'espace maintenant.

Sudo apt-get install -f

Tout ce que j'essaie me donne l'erreur maintenant d'espace. Frustrant ..... Merci pour l'aide les gens.

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

C'est l'erreur que j'obtiens en essayant de purger selon le lien affiché. BTW c'était le post 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)
5
user2993692

Pour éviter les erreurs futures "pas d'espace au démarrage /", installez ubuntu-Tweak et utilisez son concierge pour nettoyer fréquemment vos programmes en cache, vos anciens noyaux, vos programmes inutiles, etc.

Après l’installation, allez à "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

1
Parto

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 couru vient de libérer 723 Mo de mon espace disque. Ceci vérifiera la version actuelle du noyau que vous utilisez et supprimera le reste.

0
precise