Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

I accidently messed up sources.list

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
PhoxFyre
Posts: 11
Joined: 2017-02-21 01:17

I accidently messed up sources.list

#1 Post by PhoxFyre »

I accidentally messed up and deleted my sources list for Debian stable 8.7.1 amd64, any place where I can download a new one and how to fix it?

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: I accidently messed up sources.list

#2 Post by stevepusser »

MX Linux packager and developer

No_windows
Posts: 505
Joined: 2015-08-05 03:03

Re: I accidently messed up sources.list

#3 Post by No_windows »

Easy fix. It's just a text file you'll need to recreate while root.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: I accidently messed up sources.list

#4 Post by Head_on_a_Stick »

In future, use this command to edit your sources:

Code: Select all

# apt edit-sources
This will check the file and will not save it if there are any errors.
deadbang

User avatar
Ardouos
Posts: 1077
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: I accidently messed up sources.list

#5 Post by Ardouos »

If you do edit your sources with a text editor, it is best practice to backup the sources first before making any changes. Heck, it's even good to do this with most config files.

Code: Select all

# cp /etc/apt/sources.list /etc/apt/sources.list.bk
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply