0

I somehow lost /etc/sources.list I'm tired of googling it all day. Please help me :(

And it is giving me this warning.

WARNING:root:could not open file '/etc/apt/sources.list'

The program 'screenfetch' is currently not installed. You can install it by typing:
apt install screenfetch
You will have to enable the component called 'universe'
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

A: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

A: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

A: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

A: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

A: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

B: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

A: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

C: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

D: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

D: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

D: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

C: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

C: command not found
WARNING:root:could not open file '/etc/apt/sources.list'

C: command not found
2

The contents of /etc/apt/sources.list from elementary OS 0.4.1 Loki follow.

#deb cdrom:[elementary OS 0.4.1 _Loki_ - Stable amd64 (20170517)]/ xenial contrib main non-free

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to  
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
2

I asked something similar on G+ some time ago. Cannot give you the answer directly because I'm not allowed to post more than 2 links:

https://plus.google.com/100718986567621730640/posts/Pgh3YhkWErW

EDIT

with more reputation now, the full answer:

$ cat /etc/apt/sources.list.d/elementary.list
deb http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial main
deb-src http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial main

$ cat /etc/apt/sources.list.d/patches.list        
deb http://ppa.launchpad.net/elementary-os/os-patches/ubuntu xenial main
deb-src http://ppa.launchpad.net/elementary-os/os-patches/ubuntu xenial main
3
  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – RolandiXor Aug 11 '17 at 5:51
  • The problem was that the sources.list contains a lot of links and I didn't have the reputation to add more than 2 in one post. So I decided to give a suboptimal answer, than none. – Eric G Aug 11 '17 at 7:19
  • Oh, I understand. No problem. Just remember to update your answer once you have the rep. – RolandiXor Aug 16 '17 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.