Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to update from ubuntu 12.10 lately but I keep getting the "Failed to fetch" error.

W: Failed to fetch
http://security.ubuntu.com/ubuntu/dists/quantal-security/Release 
Unable to find expected entry 'independent/binary-amd64/Packages' in
Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/quantal/Release  Unable to find
expected entry 'independent/source/Sources' in Release file (Wrong
sources.list entry or malformed file)

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/quantal-updates/Release  Unable
to find expected entry 'independent/binary-amd64/Packages' in Release
file (Wrong sources.list entry or malformed file)

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/quantal-backports/Release 
Unable to find expected entry 'independent/binary-amd64/Packages' in
Release file (Wrong sources.list entry or malformed file)

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

I changed the server and deleted the source lists from /var/lib/apt/lists/ like some answers say but still. This is really annoying.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

The message

(Wrong sources.list entry or malformed file)

Means that either some entry in your sources.list file is wrong or a line is malformed.

Searched the Web and I found this old bug, it is not exactly old, but Expired.

The solution (workaround is better word) is to examine your sources.list file and remove the word independent from the lines. Try it.

A good and detailed command to see all your sources.list entries is bellow:

find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;
share|improve this answer
    
Works like a charme! thanks alot. I found tone of updates waiting and I can install softwares now :) I found that bug too. Almost lost hope on Ubuntu there. –  Farouk BA Nov 8 '12 at 20:43

For anyone coming to this in the future for a newer version of Ubuntu, NikTh's answer works but you want to search for commercial instead of independent.

This fixed the issue for me.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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