Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't understand the difference between these two lines in my sources.list, please explain:

deb http://mirror.optus.net/debian/ testing main contrib non-free


deb-src http://mirror.optus.net/debian/ testing main contrib non-free

System: Debian 6 testing, 32 bit.

share|improve this question
up vote 15 down vote accepted

deb lines are relative to binary packages, that you can install with apt.

deb-src lines are relative to source packages (as downloaded by apt-get source $package) and next compiled.

Source packages are needed only if you want to compile some package yourself, or inspect the source code for a bug. Ordinary users don't need to include such repositories.

share|improve this answer
So if I only ever install packages by Synaptic or apt-get install, I only need the first line, deb... and not deb-src...? – ptrcao Sep 11 '11 at 13:51
@ptrcao: correct – enzotib Sep 11 '11 at 13:52
Unless you want to manually compile packages (not nearly as beneficial as gentoo users like to think) or explicitly modify a few source files before compiling to suit your specific system's needs, you're fine with just the deb ... lines. – Shadur Sep 12 '11 at 6:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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