Can't upgrade from Ubuntu 14.04 to 16.04

January 13, 2017 172 views
DigitalOcean Server Optimization Ubuntu

So I'm trying to upgrade my server from Ubuntu 14.04 to 16.04 and it fails.

I did:

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

Then sudo do-release-upgrade.

It starts going and then stops because it failed to fetch some packages:

W:Failed to fetch
404 Not Found
, W:Failed to fetch
404 Not Found
, W:Failed to fetch
404 Not Found
, W:Failed to fetch
404 Not Found
, E:Some index files failed to download. They have been ignored, or
old ones used instead.

Any ideas?

2 Answers


The issue there is that you've installed a PPA for two packages that you either needed at one point, or are currently using. These repos may not have current packages for the latest release of Ubuntu that you're upgrading to, so when attempting to pull them, it fails.

When upgrading from and older version of Ubuntu to a newer release, ideally, you want to clean up your sources.list file or, given the option, simply allow the release upgrade utility to overwrite the sources.list file.

I just deployed a new Ubuntu 14.04 Droplet and started the upgrade process using:

sudo apt-get update
&& sudo apt-get upgrade -y \
&& sudo apt-get dist-upgrade -y \
&& sudo do-release-upgrade

.. and it's working as it should. When you introduce dependencies, however, you need to clear them out or make sure those dependencies have packages for the version you're upgrading to. In many cases, it's possible for some rather unexpected results when you're using one piece of software, attempt to upgrade, and then find that it may be in the latest release of Ubuntu -- or that Ubuntu decides to simply remove it (I've had it happen before).

The result could be that your existing software and configuration is overwritten with something other than what you were expecting.

  • Thanks for the answer.

    I'm not using Python 2.7 but I'm using redis.

    So maybe I should remove those packages, install redis from this PPA (which has newer stuff):


    Then run the update again.


I would simply remove the PPA's and make sure the sources.list file only contains the standard repos. Doing so is going to keep the errors at bay. Ubuntu 16.x has a package named redis-server in it, so unless the PPA is newer or has something you specifically need, I'd recommend using the one that's already a part of the standard repositories for Ubuntu.

When you run sudo do-release-upgrade, it should prompt you asking if it's okay to overwrite your sources.list file -- let it, but you'll need to remove those PPA's from your sources.list file first.

Ideally, sources.list should only contain the basics when you upgrade.

Have another answer? Share your knowledge.