2

I'm unable to run sudo apt-get update successfully for the past few days now.

When running sudo apt-get update from terminal, it shows error as,

W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/wily/InRelease  Unable to find expected entry 'main/binary-i386cddcd/Packages' in Release file (Wrong sources.list entry or malformed file)

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

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

W: Failed to fetch http://archive.canonical.com/ubuntu/dists/wily/InRelease  Unable to find expected entry 'partner/binary-i386cddcd/Packages' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://archive.canonical.com/dists/wily/InRelease  Unable to find expected entry 'partner/binary-i386cddcd/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.

And when using the Software Updater GUI to update, showing message as,

Failed to download repository information
Check your Internet connection

Screenshot of update error

Seems like some entry/configuration got corrupted. I tried changing the channels in the

Software & Updates

by enabling/disabling the restricted,multiverse options in Ubuntu Software tab as well as Canonical Partners option in Other Software tab.

enter image description here

Is there any way to reset/cleanup this repository sources list?

I could've done a re-install of Ubuntu but I'm lazy to reinstall and reconfigure all my softwares and stuff. Thanks in advance.

Karthik
  • 251
  • Is your internet connection is working? – QkiZ Jan 20 '16 at 17:41
  • @QkiZ yes i have an active internet connection. – Karthik Jan 21 '16 at 08:08
  • Thanks all for the help and suggestions. I'm unable to do any 'apt-get update' for more than a month now, so I've removed ubuntu and started using windows again. I'll try for a fresh install later. Thanks again. – Karthik Jan 21 '16 at 08:18
  • Did you try ping in.archive.ubuntu.com or browse http://in.archive.ubuntu.com/ubuntu/dists/wily/ in internet browser? – QkiZ Jan 21 '16 at 08:48
  • @QkiZ I posted this question from a browser only. How come internet works in browser and not in terminal? And btw, I could see the the 'apt-get update' command working properly, and it fails in the halfway. – Karthik Jan 21 '16 at 11:34
  • But ping is working to this server? – QkiZ Jan 21 '16 at 14:43
  • Note that 15.10 reaches its End of Life in July 2016 (https://wiki.ubuntu.com/Releases) so you will want to upgrade to the latest release – amc Jul 07 '16 at 15:25

4 Answers4

1

Try sudo -E apt-get update.

For some reason this is required.

Also the software center will not work cause I don't know how to open the software centre with sudo -E enabled...

Jakuje
  • 6,605
  • 7
  • 30
  • 37
fred
  • 19
0

Try this on terminal to remove all

cd /var/lib/dpkg/updates
sudo rm *

And then run the below command to get newer ones,

sudo apt-get update
0

Try:

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

Then:

sudo apt-get update 

if it works:

echo "nameserver 8.8.8.8" | sudo tee /etc/resolvconf/resolv.conf.d/base > /dev/null

Got it from apt-get update fails to fetch files, “Temporary failure resolving …” error.

Eliah Kagan
  • 117,780
0

Try adding:

[arch=amd64]

after deb , but before the URL in /etc/apt/sources.list

mygeea
  • 101