“Failed to fetch” errors for PPAs …
You may start getting “Failed to fetch” error messages when updating your software sources (e.g. through “apt-get update” or “Reload package information” in Synaptic), which may be due to a bug we’ve just cleaned up in Launchpad’s PPAs.
The error looks like this:
W: Failed to fetch http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/dists/maverick/Release Unable to find expected entry restricted/binary-i386/Packages in Meta-index file (malformed Release file?) E: Some index files failed to download, they have been ignored, or old ones used instead.
Fixing the cause of the error
Here’s how to fix it. In your terminal, type:
sudo gedit /etc/apt/sources.list
In the editor, look for PPA sources — these are URLs that feature the ppa.launchpad.net domain. In this example, someone has set up the ~ubuntu-x-swat/x-updates PPA incorrectly:
deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick main deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick restricted deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick universe deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick multiverse
All of these refer to different components within the same PPA. PPAs only have the first component, so you should delete lines for PPAs that don’t end in “main”. Watch out for lines that wrap, as with the “restricted”, “universe” and “multiverse” examples above.
You may also need to check source lists under the /etc/apt/sources.list.d directory.
Note: you should leave your standard Ubuntu sources, and any non-PPA sources, just as they are.
If you’re not sure how to do this, pop into #launchpad on freenode and one of the Launchpad community will help.
Why this has happened
The Debian-style archives used by Ubuntu are often divided into different components. With Ubuntu, you’ve probably heard of at least “main” and “universe”.
PPAs don’t use these components. However, a bug in Launchpad meant that, until December, PPAs were published with a number of different components. All of these components were empty and there was no way to publish anything to them.
Today, we started to remove these empty components from PPAs. The only impact we anticipate is that anyone whose sources.list referenced these components in a PPA will now see an error when performing an apt-get update or similar.
No packages are being deleted and anyone with a correctly defined sources.list will be able to carry on just as before.



February 19th, 2011 at 9:40 pm
“Here’s how to fix it. In your terminal, type:
sudo gedit /etc/apt/sources.list”
I thought everybody was learned on how bad this is for any programs that may write configuration data, temporary files, backup files, etc… in your home directory.
Should use:
gksudo gedit /etc/apt/sources.list
: or :
sudo -H gedit /etc/apt/sources.list
So stuff written to $HOME, will go to root’s home.
Later, Seeker
December 20th, 2011 at 4:19 am
this example was an easy fix for me and might work for others. In this example:
W: Failed to fetch http://ppa.launchpad.net/openstack-release/2011.2/ubuntu/dists/oneiric/main/source/Sources 404 Not Found
2011.2 no longer exist. I confirmed this by following the link to its parent. I tracked it back until a newer child link was available. Sure enough, 2011.3/ubuntu/dists/oneiric/main/source/Sources was there. After the confirmation I simply open the GUI of ‘Software Sources’ then clicked on ‘Other software’ tab and edited the correct line.
April 21st, 2012 at 7:24 pm
OK, so none of my sources in my /etc/apt/sources.list has any http://ppa.launchpad.net/* url
HOWEVER I do get the error
W: Failed to fetch http://ppa.launchpad.net/olivier-berten/misc/ubuntu/dists/lucid/main/binary-amd64/Packages.gz 404 Not Found
So I’m guessing that some other of the vanilla sources are proxying the ppa.launchpad.net — I even commented out the universe/multiverse and kept only the main-restricted sources and still got the error!
June 12th, 2012 at 7:09 am
“OK, so none of my sources in my /etc/apt/sources.list has any http://ppa.launchpad.net/* url
HOWEVER I do get the error”
‘$ ls -la /etc/apt/sources.list.d/’