Previous Section  < Day Day Up >  Next Section

Recipe 3.2. Getting Software for a Debian System

3.2.1 Problem

You need some software for your Debian system. There are gigabytes of software out there, waiting for you—but where do you find software that's packaged for Debian? How do you decide which software archives to use?

3.2.2 Solution

Debian packages come from official Debian package repositories, unofficial repositories, and CD-ROMs. You must specify these sources in /etc/apt/sources.list, then use Debian's packaging tools to install software from these sources.

Visit these sites to find the addresses for download sites:

Official Debian mirror

Unofficial APT repositories

Visit this site for a worldwide list of CD vendors:

Vendors of Debian CDs

Use the Debian package search page to find individual packages:

Debian packages search page and information

The next step is to edit /etc/apt/sources.list with your selected sources. See the Discussion for some sample configurations.

3.2.3 Discussion

Here are three sources.list examples. Run apt-get update every time you change sources.list, and run it periodically to keep your package lists up-to-date.

sources.list for Woody:

# See sources.list(5) for more information

# Remember that you can only use http, ftp, or file URIs

# CD-ROMs 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

sources.list for Sarge:

deb testing main contrib non-free

deb testing/non-US main contrib non-free

deb testing/updates main contrib non-free

# Uncomment if you want the apt-get source function to work

#deb-src testing main contrib non-free

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

sources.list for Sid:

deb unstable main contrib non-free

deb unstable/non-US main contrib non-free

# Sources

deb-src unstable main contrib non-free

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

apt-get always takes the newest package version, if it finds multiple sources. List your sources in order of preference, because apt-get starts at the top and works its way down.

Editing your sources.list a lot is perfectly acceptable, and it's a simple way to control installations. Put in all the lines you think you might ever want to use, and comment out the lines that are unneeded for specific installations.

A nice thing to do is to select official Debian mirrors for your sources.list, to take the load off the servers at A complete list of the official mirrors is at

Security updates are available only from Security updates are not mirrored. See the appropiate sources.list above to get the correct lines for Stable and Testing. And remember while that Stable receives swift, timely security updates, they are issued much more slowly for Testing and Unstable.

3.2.4 See Also

    Previous Section  < Day Day Up >  Next Section