2

I changed something which bricked my rpi. I changed sources.list and raspi.list then when I run sudo apt update I am getting this error:

E: Malformed entry 1 in list file /etc/apt/sources.list (Suite)
E: The list of sources could not be read.

How can I restore sources.list and raspi.list?

2
  • And I am using Raspberry Pi 3b+ Buster
    – neotick
    Jan 23, 2021 at 18:51
  • More important than the hardware you're running is: which version of the OS you're using?... e.g. buster?? stretch is a possibility, but quite old now.
    – Seamus
    Jan 24, 2021 at 1:00

1 Answer 1

8

These are the default entries from an unmodified image:

    rpi ~$ cat /etc/apt/sources.list
    deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
    # Uncomment line below then 'apt-get update' to enable 'apt-get source'
    #deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

    rpi ~$ cat /etc/apt/sources.list.d/raspi.list
    deb http://archive.raspberrypi.org/debian/ buster main
    # Uncomment line below then 'apt-get update' to enable 'apt-get source'
    #deb-src http://archive.raspberrypi.org/debian/ buster main  

After you restore these values, you will need to run sudo apt update again.

Your Answer

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

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