Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 01-18-2005, 09:56 AM   #1
Registered: Oct 2004
Distribution: Debian
Posts: 39

Rep: Reputation: 15
all i want is a decent /etc/apt/sources.list file

I was just wondering if somebody could explain to me the intricacies of the /etc/apt/sources.list file on a debian system. I've read some documenation and articles and none of them seem complete.

The apt how-to ( has the following example:

We usually find the following in the default Debian sources.list:

# See sources.list(5) for more information, especially
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
deb stable main contrib non-free
deb stable/non-US main contrib non-free
deb stable/updates main contrib non-free

# Uncomment if you want the apt-get source function to work
#deb-src stable main contrib non-free
#deb-src stable/non-US main contrib non-free
but nowhere does it mention how to modify it to use either the testing or unstable distributions. This would be fine (I'd just substitute 'testing' or 'unstable' for 'stable' in the above example for all the lines, INCLUDING the line), if it weren't for the following:

Example - stable

The sources.list for using stable reads --

# See sources.list(5) for more information
deb stable main contrib non-free
deb stable/non-US main contrib non-free
deb stable/updates main contrib non-free is only relevant for stable since the core stable is supposed to be constant. With the other distributions, security updates are just normal package updates.
Note the bottom paragraph of the above quote (which I got from, which is causing me some confusion. Is the above correct?

And I've also read somewhere that you're not supposed to mix stable with testing or unstable (and testing with stable or unstable, etc.) in the /etc/apt/sources.list file. But I've seen examples where people list their preferred distributions: say they'll list 'stable' lines first, then 'testing', if they prefer stable to testing. What is the deal?
Old 01-18-2005, 10:38 AM   #2
Senior Member
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
Here is an example with "testing" and "unstable"
deb unstable main contrib non-free
#deb-src unstable main contrib non-free

deb unstable/non-US main contrib non-free
#deb-src unstable/non-US main contrib non-free

deb testing main contrib non-free
#deb-src testing main contrib non-free

deb testing/non-US main contrib non-free
#deb-src testing/non-US main contrib non-free

deb testing/updates main contrib non-free
#deb-src testing/updates main contrib non-free
There are security updates in testing. If you use the above sources.list, every package will be installed from "unstable" by default because it has the latest versions. You can run a mix of testing/unstable by using pinning. Se the document here: especially the part about keeping a mixed system.
Old 01-18-2005, 09:50 PM   #3
Registered: Oct 2004
Distribution: Debian
Posts: 39

Original Poster
Rep: Reputation: 15
Thank you for the reply.

I'm not sure if the bit of code you posted is actually a part of your /etc/apt/sources.list file, but if it is, then you should check out the following:

Supposedly, using http rather than ftp is the way to go. I know the link I provided is kind of weak: the guy says 'I have heard that people get...'.
I had read something a little bit more convincing a while ago, but can't seem to be able to find it with google now. Does anyone care to comment?
Old 01-18-2005, 10:28 PM   #4
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
HTTP is a faster protocol than FTP. At least, that is what is said....

If you have both "testing" and "unstable" in your sources.list, you can use apt-get like this:

apt-get install -t testing foo
apt-get install -t unstable foo

Dependencies get solved automatically. I think pinning is only needed if you do a distro upgrade to the next higher version or so. For individual packages you don't need it.

It is also not recommended to use a mixed system with all three versions. Stable-testing or testing-unstable should be ok. Stable-testing-unstable is not a good idea. Although I have this situation on one of my desktop systems, and problems are few, only with KDE.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Recommendation for Debian Etch sources.list ( /etc/apt/sources.list ) forgox Debian 6 05-05-2007 02:57 PM
correct setting of /etc/apt/sources.list for local file pascalv Linux - Software 4 07-15-2005 10:24 AM
My apt sources.list file his mess up! NeeD_ResT Debian 3 11-20-2004 11:47 AM
How does your /etc/apt/sources.list file looks like? sud_crow SUSE / openSUSE 1 10-30-2004 06:25 AM
I need help configuring my apt-get sources.list file... Mr.Radar Debian 4 06-01-2004 10:40 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration