Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Probably incorrect release file causing apt-get update to fail

I’m installing a VM of Ubuntu 14.04 on my PC.

When I run sudo apt-get update, I get a response:

W: Failed to fetch http://us.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've tried to reinstall the VM and it didn't fix the issue.

Thanks in advance!

like image 488
Srol Avatar asked Dec 05 '25 13:12

Srol


1 Answers

Here are some possible solutions (the last one should resolve the problem in case other ones fail) for them who still face this problem:

1. Remove cached files:

sudo rm /var/lib/apt/lists/* -vf

and if required, the files in partials too:

sudo rm /var/lib/apt/lists/partials/* -vf

and then try sudo apt-get update

2. Modify sources.list:

You might edit /etc/apt/sources.list making necessary changes to the list of repository names. If sources.list gets corrupted somehow, then you could delete it and could generate a fresh one. This might be of great help in this regard.

3. Choose a different server:

Go to Software & Updates -> Ubuntu Software. From Download from, select other... and select a preferable server which is different from the previous one. You can click Select Best Server and let the system choose the best server for you. You will be prompted to refresh after changing the server. Finally, sudo apt-get update should work fine thereafter.

Note: I had the same problem which was resolved by the 3rd solution. I was also unable to download some application from Terminal and Ubuntu Software Center as well.

like image 105
Snehasish Karmakar Avatar answered Dec 07 '25 09:12

Snehasish Karmakar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!