4

I accidentally messed up my apt-sources list in raspberian n my Raspberry PI 3.

my distro is:

Linux host 4.4.9-v7+ #884 SMP Fri May 6 17:28:59 BST 2016 armv7l GNU/Linux

Is there any way to get back the default /etc/apt/sources.list ?

I never changed it in the past...

4
  • What's stopping you from checking the contents of the file in the original image and using a text editor to copy that content to the current /etc/apt/sources.list?
    – techraf
    Nov 30, 2016 at 21:51
  • @techraf It's the only Raspberry PI I have with this version of Raspberian on it.
    – leeand00
    Nov 30, 2016 at 23:03
  • You don't need a Raspberry Pi to check what's on the image you used. You can just mount the image on any machine and check. What is "Raspberian", btw?
    – techraf
    Nov 30, 2016 at 23:07
  • The only necessary content is deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi and AFAIK you can manage it through the menu of GUI
    – Milliways
    Nov 30, 2016 at 23:08

1 Answer 1

6

/etc/apt/sources.list

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

The directory /etc/apt/sources.list.d contains the file

raspi.list

/etc/apt/sources.list.d/raspi.list

deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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