-1

I am trying to use

sudo apt-get update

But I am getting error as:

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release  
Unable to find expected entry 'restricted/source/Sources' 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 used sudo rm -vf /var/lib/apt/lists/* but still failed. Please suggest me something

George Udosen
  • 36,677
Raghu
  • 101
  • What made you think sudo rm -vf /var/lib/apt/lists/* would solve anything ? Please do not remove system files without discretion.Post your sources list - See http://askubuntu.com/questions/78951/how-do-i-remove-a-malformed-line-from-my-sources-list – Panther Feb 24 '17 at 17:46
  • I saw it in a solution mention at askbuntu itself, so what do i do? do i comment the site, in the sources.list ???? i am really new to ubuntu, its been just 3 days – Raghu Feb 25 '17 at 06:09

1 Answers1

0

I think you need to check "/etc/apt/sources.list". Try looking for the url given in the error message and put a "#" in front of it to turn it into a comment. Btw, did you change the file manually?

Even though you get an error, that should mean that just the wrong line is ignored. All other (correct) lines should still be checked for updates.

Mrokii
  • 502
  • I did not change the file manually, i just used sudo rm -vf /var/lib/apt/lists/* , sorry, i am really new to ubuntu, so dont really know what to do – Raghu Feb 25 '17 at 06:10