Current status

I've started to suspect this is not an Ubuntu issue, but related to the internet connection here at my work. Until I'm sure, Im leaving my question below:

Original question

I'm stuck, can't upgrade my system. Running sudo apt-get upgrade gives me the following:

mmm@alalunga:~$ sudo apt-get upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  ginn libgrip0 linux-generic-pae linux-headers-generic-pae linux-image-generic-pae
The following packages will be upgraded:
  apport apport-gtk bind9-host build-essential dhcp3-client dhcp3-common dnsutils eog evince evince-common firefox firefox-branding firefox-dbg firefox-globalmenu
  firefox-gnome-support firefox-locale-en gimp gimp-data gir1.2-totem-1.0 glib-networking glib-networking-common glib-networking-services gnupg gpgv
  icedtea-6-jre-cacao icedtea-6-jre-jamvm icedtea-6-plugin icedtea-netx icedtea-netx-common icedtea-plugin isc-dhcp-client isc-dhcp-common libapache2-mod-php5
  libart-2.0-2 libbind9-80 libdns81 libevince3-3 libgimp2.0 libisc83 libisccc80 libisccfg82 liblwres80 libssl-dev libssl-doc libssl1.0.0 libtotem0 linux-firmware
  linux-libc-dev openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib openssl php-pear php5-cli php5-common php5-curl php5-dev php5-gd php5-mysql php5-xsl
  policykit-1-gnome python-apport python-django python-gst0.10 python-problem-report resolvconf thunderbird thunderbird-globalmenu thunderbird-gnome-support totem
  totem-common totem-mozilla totem-plugins xserver-xorg-input-synaptics
74 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 317 MB/327 MB of archives.
After this operation, 1.481 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
Get:1 http://archive.ubuntu.com/ubuntu/ precise-updates/main openjdk-6-jre-headless i386 6b24-1.11.4-1ubuntu0.12.04.1 [27,3 MB]
Get:2 http://archive.ubuntu.com/ubuntu/ precise-updates/main openjdk-6-jre-headless i386 6b24-1.11.4-1ubuntu0.12.04.1 [27,3 MB]                                       
Get:3 http://archive.ubuntu.com/ubuntu/ precise-updates/main openjdk-6-jre-headless i386 6b24-1.11.4-1ubuntu0.12.04.1 [27,3 MB]                                       
Get:4 http://archive.ubuntu.com/ubuntu/ precise-updates/main openjdk-6-jre-headless i386 6b24-1.11.4-1ubuntu0.12.04.1 [27,3 MB]                                       
Get:5 http://archive.ubuntu.com/ubuntu/ precise-updates/main openjdk-6-jre-headless i386 6b24-1.11.4-1ubuntu0.12.04.1 [27,3 MB]                                       
Get:6 http://archive.ubuntu.com/ubuntu/ precise-updates/main openjdk-6-jre-headless i386 6b24-1.11.4-1ubuntu0.12.04.1 [27,3 MB]                                       
Get:7 http://archive.ubuntu.com/ubuntu/ precise-updates/main openjdk-6-jre-headless i386 6b24-1.11.4-1ubuntu0.12.04.1 [27,3 MB]                                       
9% [7 openjdk-6-jre-headless 27,3 MB/27,3 MB 100%]

It keeps downloading the package openjdk-6-jre-headless, then does nothing for a while (hanging on what's the last line above), then download the package again. It's at its 13th download attempt at the moment of writing. The actual downloads seem to be done just fine, but whatever it does after downloading seems to be failing.

I tried removing openjdk-6, but then it wanted to install openjdk-7 instead, with the same result, hanging at openjdk-7-jre-headless instead.

I also tried changing servers from my local (Danish) to the main server. No luck.

It's also keeping me from upgrading alle the other packages.

What to do?


After following instructions in the answer by @lpanebr, it is now stuck at the linux-firmware package. So, maybe it's a more general problem than being related to specific package(s)? Although it did download some packages without problems before getting stuck at linux-firmware.

  • Have you tried running sudo apt-get update first? Just a question. – JXPheonix Sep 25 '12 at 13:25
  • Yep. But thanks for checking for stupidity anyways :) Read the note I wrote on the top of the question. – decibyte Sep 25 '12 at 14:14
  • Well, whenever you get back from work (if possible) you can try bringing the computer home and using that connection. If that works properly, it's possibly the proxy server messing with ubuntu. – JXPheonix Sep 25 '12 at 14:18

My problem was that I interrupted the download of an apt-package (here linux-firmware) behind a proxy which caused a partial downloaded (and damaged) file in the proxy cache. When I tried to upgrade, the download of this package started in the middle of the file over and over again.

What I did was to download the file manually, put it into /var/cache/apt/archives.


I never got back to reveal the reason for this weird behaviour.

It turned out to most likely be a network issue. I'm pretty sure it was due to some antivirus/firewall/malware installed somewhere between me and the internet.

If I tunnelled everything via SSH to exit to the rest of the internet from my home connection, there was no problem. Similarly, no problems if I used a mobile hotspot.

The file I got to download from the URL was simply mangled and useless if downloaded directly via the company network.


I was having a very similar problem. My update manager would always report "Not all updates could be installed". Whenever I tried this:

sudo apt-get update && sudo apt-get upgrade

I got this:

The following packages have been kept back:
  0ad 0ad-data ginn libgrip0 linux-generic linux-headers-generic linux-image-generic touchegg

Then I did:

sudo apt-get purge touchegg 0ad 0ad-data

Because I knew I didn't need those anyway.

After that the command line was still giving me the same as above. Then, for no particular reason, I did System Settings > Details and clicked the Install updates button. For my surprise it installed all those packages without any issues..

Very weird.. hope this helps.

  • 1
    Thanks for your answer. I tried purging packages until it stopped trying to install openjdk-7 stuff. So far so good. Now it's stuck at linux-firmware, which I think would be a bad idea to purge, right? Redownloading it over and over again. This is very frustrating :( – decibyte Sep 25 '12 at 12:43
  • Can you post the current list of "packages been kept back" and "packages that will be upgraded"? – lpanebr Sep 25 '12 at 13:48
  • As I've added to the top of the question, I'm suspecting this is not at all an issue related to Ubuntu, but to our internet connection here at work. I'll keep you updated when I know a little more, but thanks a lot for your help so far :) – decibyte Sep 25 '12 at 13:57

I got stuck at the sudo do-dist-upgrade, which was very annoying.

exchanging servers in /etc/apt/sources.list resolved the issue, I took a best looking server from here:


and exchanged the standard one from ubuntu.com

sudo apt-get update && sudo apt-get upgrade



Have you tried sudo apt-get dist-upgrade. It should install all the packages, even those that are not being upgraded now.

In fact, it means a distribution update. For me it was useful when I had some problem during the updating process.

  • Thanks, I've tried everything -- even that. But as I just added in the top of the question: I suspect this is not an issue with Ubuntu, but with the internet connection at my work. – decibyte Sep 25 '12 at 13:33

decibyte, I do a lot of Ubuntu work at my school, and have run into all sorts of proxy server issues. Are you behind a proxy server? At my school, we are supposed to use an auto proxy .pac file, but this has issues with apt in Ubuntu. I downloaded the .pac file, opened it in gedit, and just read it. I saw that the .pac file directs toward an http proxy address, but directs ftp to direct connection. So, I changed my settings in the network manager to manual, and put my http proxy address and port in for http and https, and left ftp blank. Click "Apply System Wide" and enter my password, and presto! The only issue left is that Firefox does not seem to like this, so I change my setting back to auto and put in the address of the .pac file and DO NOT click "Apply System Wide" and everything works!!!!!!

Now, if the proxy server is not the issue, then try the following commands:

sudo apt-get autoclean
sudo apt-get update
sudo apt-get dist-upgrade

Be sure to watch out for error messages as you enter each command. I hope this helps!

  • Thanks for the answer. I hope this will help others. I actually did find the problem. I just need to find the time to answer this myself. It was caused by our ISP having some sort of "intelligent" filter against malware. – decibyte May 7 '13 at 7:08

I was using an anonymizing VPN (Spotflux) on the host system when I encountered similar issues. I disabled for the duration of my apt-get sessions and didn't have any issues.


This also happened to me just now, on the quantal distro. (actually it had been happening for about a week, and I would just exit the terminal.) Now that I looked into it, the ppa causing the problem in my case was VLC's:

Ign ftp://ftp.videolan.org ./ Release
Err ftp://ftp.videolan.org ./ Packages                
  Server closed the connection
Err ftp://ftp.videolan.org ./ Translation-en_PH
  Server closed the connection
Err ftp://ftp.videolan.org ./ Translation-en
  Server closed the connection
Fetched 898 kB in 17min 4s (876 B/s)
W: Failed to fetch ftp://ftp.videolan.org/pub/debian/stable/./Release.gpg  Server     closed the connection

W: Failed to fetch ftp://ftp.videolan.org/pub/debian/stable/./Packages  Server closed the connection

W: Failed to fetch ftp://ftp.videolan.org/pub/debian/stable/./en_PH  Server closed the connection

W: Failed to fetch ftp://ftp.videolan.org/pub/debian/stable/./en  Server closed the connection

E: Some index files failed to download. They have been ignored, or old ones used instead.

It seems they've released a new update in the past week or so; it may be causing problems. Nonetheless, I disabled the VLC ppa in software sources in the meantime and it solved the problem.


This happened to me as well while performing an apt-get update

Kali Linux locked out and stopped passing traffic, causing the flow timers to bug out.

This was fixed by running:

^C # To cancel the update
sudo apt-get autoremove
sudo apt-get update
sudo apt-get upgrade

The stale flow was flushed out and my update continued with no problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.