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

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,793
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
  • 119,640
0

Try adding:

[arch=amd64]

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

mygeea
  • 101