0

I had cache limit problems with GPG keys. A post here solved that, and now sudo apt-get update runs without any errors. Now sudo apt-get upgrade does not work. It tells me to try sudo apt-get -f install and when I run it I get the errors shown below:

:~$ sudo apt-get -f install

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating dependencies... Done
The packages listed below were installed automatically and are no longer needed.
  linux-headers-3.13.0-35 linux-headers-3.13.0-35-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-headers-3.13.0-46
The following new packages will be installed:
  linux-headers-3.13.0-46
0 updated, 1 will be installed, 0 to remove 455 not updated.
2 not fully installed or removed.
You need to download 0 B/8.877 kB of packages.
This operation will require 63.3 MB of additional disk space.
Do you want to continue? [Y/n] y
(Reading the database ... 1181689 files or directories are now installed.)
Preparing to unpack .../linux-headers-3.13.0-46_3.13.0-46.79_all.deb ...
Unpacking linux-headers-3.13.0-46 (3.13.0-46.79) ...
dpkg: error processing the archive /var/cache/apt/archives/linux-headers-3.13.0-46_3.13.0-46.79_all.deb (--unpack):
 Could not create `/usr/src/linux-headers-3.13.0-46/arch/ia64/include/asm/cache.h.dpkg-new' (while processing `./usr/src/linux-headers-3.13.0-46/arch/ia64/include/asm/cache.h'):   
No space left on device.  
No apport report written because MaxReports is reached already.  
dpkg-deb: error: error: subprocess paste was killed by signal (Broken pipe).  
The following errors were encountered during processing:  
 /var/cache/apt/archives/linux-headers-3.13.0-46_3.13.0-46.79_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
}
karel
  • 114,770

1 Answers1

0

Test this:

Open a terminal.

Press Ctrl+Alt+T

Run it:

sudo -i
apt-get clean
apt-get autoremove
UNUSCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
apt-get remove --purge $UNUSCONF
NEWKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
ADDKERNEL="linux-(image|headers|ubuntu-modules|restricted-modules)"
METAKERNEL="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
UNUSKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $ADDKERNEL |grep -vE $METAKERNEL|grep -v $NEWKERNEL)
apt-get remove --purge $UNUSKERNELS
apt-get install --reinstall deborphan
deborphan
apt-get --purge remove $(deborphan)
deborphan --libdevel
apt-get --purge remove $(deborphan --libdevel)
deborphan --find-config
dpkg --purge $(deborphan --find-config)
apt-get update
apt-get dist-upgrade
dpkg --configure -a
apt-get -f install
apt-get clean
reboot
kyodake
  • 15,401
  • It doesn't work, I run it excalty and the log is here: I've an full disk error: ´No se escribió un informe «apport» porque el mensaje de error indica que el error es de disco lleno dpkg-deb: error: el subproceso copiado fue terminado por la señal (Tubería rota) Se encontraron errores al procesar: /var/cache/apt/archives/linux-headers-3.13.0-46_3.13.0-46.79_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) ´ – m4verick May 19 '15 at 15:24
  • Run first: sudo rm /var/cache/apt/archives/*.deb – kyodake May 21 '15 at 00:58
  • It run prefectly after run first " sudo rm /var/cache/apt/archives/*.deb" and then run your's first answer step by step. Now i want to know what was happening ? I didnt run anything strange before or installing anything rare. I could note that you do an clear image of my old kernel and update it, thanks so much kyodake yours 1,958 gold medals completely justified. Regards !!! – m4verick May 31 '15 at 15:28