E: Some index files failed to download. They have been ignored, or old ones used instead after apt-get update

  • How to solve this trouble in Ubuntu 12.04

Open a terminal (CTRL+ALT+T) and issue the following commands in order.


sudo cp /etc/apt/sources.list ~/ 
sudo wget "http://pastebin.com/raw.php?i=uzhrtg5M" -O /etc/apt/sources.list 
sudo apt-get update
sudo rm /etc/apt/sources.list.d/ubuntu-extras.list
sudo apt-get update

This solution is not general. It is specific to the sources.list file of the Original Poster.

The second command which starts with wget downloads and replaces the sources.list file with a specific for Precise (Ubuntu 12.04) sources.list file. See the file in raw format by visiting this page.

The fourth command removes the ubuntu-extras.list file which had an impact/conflict with another file of the same, so we removed it to avoid the error

W: Duplicate sources.list entry

see comments above.

It means that these sources cannot be reached:


Try selecting another server to fetch from (not the one in Ukraine).