Thursday, 28 July 2016

How do I remove a malformed line from my sources.list?



If you face any malformed line error like below, i strongly recommend you to comment out(adding # before the line) the line rather than deleting it in /etc/apt/sources.list file.

E: Malformed line 91 in source list /etc/apt/sources.list (dist parse)

From the above error, the line number 91 in /etc/apt/sources.list file is corrupted. To comment out the line number 91, you have to run the below command on terminal.
 
sudo sed -i '91s/\(.*\)/#\1/' /etc/apt/sources.list

91 in the above code represents the line number. Replace the number 91 in the above code with your's if you got any malformed line error.
In some cases malformed line error will also occur in a list file that was actually present inside /etc/apt/sources.list.d directory. For example,
 
E: Malformed line 1 in source list /etc/apt/sources.list.d/google.list (dist parse)

In this case i strongly recommend you to delete the google.list file by running sudo rm /etc/apt/sources.list.d/google.list and then add the corresponding PPA again.

Finally update all the repositories by running sudo apt-get update command on terminal. Now the error won't appears.

This Article Source link is given below :: 


http://askubuntu.com/questions/78951/how-do-i-remove-a-malformed-line-from-my-sources-list

No comments:

Post a Comment

Thank for your valuable Feedback