web-dev-qa-db-fra.com

Espace disque plein lors de l'opération apt-get sur Ubuntu 14.04

Im Essayer d'installer un nouveau logiciel sur mon Ubuntu 14.04, qui fonctionne

    uname -r
3.13.0-45-generic

Il y a de vieux noyaux installés sur ma machine

dpkg --list | grep linux-image
rc  linux-image-3.13.0-24-generic       3.13.0-24.47                     AMD64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-45-generic       3.13.0-45.74                     AMD64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-55-generic       3.13.0-55.94                     AMD64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-57-generic       3.13.0-57.95                     AMD64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-58-generic       3.13.0-58.97                     AMD64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-59-generic       3.13.0-59.98                     AMD64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-3.13.0-61-generic       3.13.0-61.100                    AMD64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc  linux-image-extra-3.13.0-24-generic 3.13.0-24.47                     AMD64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-45-generic 3.13.0-45.74                     AMD64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-55-generic 3.13.0-55.94                     AMD64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-57-generic 3.13.0-57.95                     AMD64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-58-generic 3.13.0-58.97                     AMD64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-59-generic 3.13.0-59.98                     AMD64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
iF  linux-image-extra-3.13.0-61-generic 3.13.0-61.100                    AMD64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
iU  linux-image-extra-3.13.0-62-generic 3.13.0-62.102                    AMD64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
iU  linux-image-generic                 3.13.0.62.69                     AMD64        Generic Linux kernel image

Quand j'essaye de les purger en utilisant la commande ci-dessous

Sudo apt-get purge linux-image-3.13.0-24-generic
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-extra-3.13.0-62-generic : Depends: linux-image-3.13.0-62-generic but it is not going to be installed
 linux-image-generic : Depends: linux-image-3.13.0-62-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Je suis au-dessus de l'erreur.

Pendant la suppression automatique, obtenir une erreur

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-extra-3.13.0-62-generic : Depends: linux-image-3.13.0-62-generic but it is not installed
 linux-image-generic : Depends: linux-image-3.13.0-62-generic but it is not installed
E: Unmet dependencies. Try using -f.

et si je lance l'installation forcée, cela signifie qu'il ne reste plus d'espace sur l'appareil ..

Sudo apt-get install -f
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.13.0-55 linux-headers-3.13.0-55-generic
  linux-headers-3.13.0-57 linux-headers-3.13.0-57-generic
  linux-headers-3.13.0-58 linux-headers-3.13.0-58-generic
  linux-headers-3.13.0-59 linux-headers-3.13.0-59-generic
  linux-image-3.13.0-55-generic linux-image-3.13.0-57-generic
  linux-image-3.13.0-58-generic linux-image-3.13.0-59-generic
  linux-image-extra-3.13.0-55-generic linux-image-extra-3.13.0-57-generic
  linux-image-extra-3.13.0-58-generic linux-image-extra-3.13.0-59-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-image-3.13.0-62-generic
Suggested packages:
  fdutils linux-doc-3.13.0 linux-source-3.13.0 linux-tools
The following NEW packages will be installed:
  linux-image-3.13.0-62-generic
0 upgraded, 1 newly installed, 0 to remove and 48 not upgraded.
5 not fully installed or removed.
Need to get 15.2 MB of archives.
After this operation, 42.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.Voxel.net/ubuntu/ trusty-updates/main linux-image-3.13.0-62-generic AMD64 3.13.0-62.102 [15.2 MB]
Fetched 15.2 MB in 4s (3,237 kB/s)                        
(Reading database ... 243451 files and directories currently installed.)
Preparing to unpack .../linux-image-3.13.0-62-generic_3.13.0-62.102_AMD64.deb ...
Done.
Unpacking linux-image-3.13.0-62-generic (3.13.0-62.102) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-62-generic_3.13.0-62.102_AMD64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-3.13.0-62-generic' to '/boot/vmlinuz-3.13.0-62-generic.dpkg-new': failed to write (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.13.0-62-generic /boot/vmlinuz-3.13.0-62-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-62-generic /boot/vmlinuz-3.13.0-62-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.13.0-62-generic_3.13.0-62.102_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Comment puis-je libérer de l'espace sur mon Ubuntu pour pouvoir y installer de nouvelles applications?

Veuillez aider ...

1
Bhaskar

J'ai trouvé beaucoup de choses dans /var/cache.

(Après une tentative infructueuse d'installation Java 8 de ppa)

BTW, j'ai déplacé le dossier /var/cache/Oracle-jdk8-installer à /media/flash_ext3/var/cache (où flash_ext3 est le nom d'une clé USB 32G formatée pour utiliser ext3) et a créé un lien:

cd /var/cache
Sudo ln -s /media/flash_ext3/var/cache/Oracle-jdk8-installer Oracle-jdk8-installer

(et a fait un chmod a+rwx)

0
18446744073709551615