Contents
How do I fix the sources list in Ubuntu?
3 Answers
- Move the corrupted one to the safe place sudo mv /etc/apt/sources.list ~/ and recreate it sudo touch /etc/apt/sources.list.
- Open Software & Updates software-properties-gtk. This will open software-properties-gtk with no repository selected.
How do I change the source list?
Append new line of text to current sources. list file
- CLI echo “new line of text” | sudo tee -a /etc/apt/sources.list.
- GUI (Text Editor) sudo gedit /etc/apt/sources.list.
- Paste new line of text on new line at end of current sources. list text file in Text Editor.
- Save and close sources.list.
How do I fix the source list of a file?
1 Answer
- Open a terminal and run sudo gedit `/etc/apt/sources.list` I am not sure if gedit is installed by default.
- Save the file, close the editor and run sudo apt-get update.
- You should now be able to install iceweasel with this command: sudo apt-get install iceweasel.
How to fix a broken package in apt-get?
Another approach to solving the broken package issue via apt-get is to edit the “/etc/apt/sources/list” file and adding sites with newer versions of packages available. Then running the “ apt-get update” command to update the repository list.
How to fix an error in my apt sources list?
And now, when I type sudo apt-get update or open the Update Manager, the system just shows me the error message: E: Type ‘ [some repository]’ is not known on line 62 in source list /etc/apt/sources.list E: The list of sources could not be read.**
What to do if APT repository name change?
Then run apt update instead of apt-get update to interactively accept the various changes. According to this reddit post this repository name change was introduced in release 10. If not, apt-get update won’t let you update with Buster and will spit out messages like these:
What to do when apt-get update is not working?
Then running the “ apt-get update” command to update the repository list. If the above method does not fix the issue of broken dependencies and broken packages and still you are receiving the error, then try the following methods.