Score:0

I can't find my sources and I'm unable to update (Ubuntu 20.04)

th flag

I was just trying to install ADB and it returned the following error message:

W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory)
W: Unable to read /etc/apt/preferences.d/ - DirectoryExists (2: No such file or directory)

I then went into my sources GUI to enable the universe source list and noticed that all of my sources where unticked and nothing was listed. I tried to recheck them and reload my cache but it returned a error message everytime.

enter image description here

I then tried running sudo apt update and it returned the same error message as the ADB installation. So I checked my actual sources folder and inside the folder there were two files, sources.list and sources.save. The .list simply redirects me to the sources GUI and the .save has a single source in it which is 'deb http://archive.ubuntu.com/ubuntu focal multiverse main'. Empty sources list

I am a bit lost as to what can be done here. Did I accidentally wipe my sources list? Can it be restored? I do not recall playing with the sources/repositories at any point in the past week but I did run the command sudo du -sh /var/cache/apt when trying to free up some space the other day and I also tried to backup my Ubuntu via Penguin Eggs which involved a bunch of console commands I did not admittedly fully understand.

If it can't be restored does this mean any applications I installed via it will no longer update?

Thank you for your help.

Nmath avatar
ng flag
Does this answer your question? [How do I restore the default repositories?](https://askubuntu.com/questions/124017/how-do-i-restore-the-default-repositories). Sources are at `/etc/apt/sources.list` and not `/etc/apt/sources.list.save`. The fact that the former is missing and the latter exists tells me that you probably ran commands you found somewhere without understanding what they did. Not a great idea. Please review the question for restoring the default repos.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.