Penguin

New Zealand sources.list for apt(8) on Debian and Ubuntu

apt's behaviour is moulded by files in /etc/apt: apt.conf(5) tells apt how to behave, and (more importantly) sources.list(5) tells apt where to look for packages. There are two types of entries in this file, deb lines, referring to Debian binary package repositories, and deb-src lines, for source packages. Unless you want to compile packages yourself from Debian sources, you can usually remove the deb-src lines from your config and save some time downloading headers.

If you're running a production server, or don't need bleeding edge, your lines should read

deb [mirror] stable main contrib non-free

The more exciting new stuff is in testing or unstable; see FlavoursOfDebian for more information on how this works.

/etc/apt/sources.list

This is a file set up for a New Zealand user, using the stable distribtion. If you want to use testing or unstable, just change mentions of 'stable' to the flavor of your choice. If you have bandwidth to burn, enable more than one mirror at once (Packages.gz tends to be around 2mb.)

NOTE: if you use 'stable', when a new stable release happens, apt-get will start giving you new versions of packages, which could do all sorts of things. It pays to use the name of the distribution, ie 'sarge', in this case.

There are plenty of other Apt mirrors around the world; try http://www.your two letter country code.debian.org/.

# WLUG sources.list for Debian.  See http://www.wlug.org.nz/AptSourcesList
# for an up to date version.  See sources.list(5) for more information.
#
# Remember that you can only use http, ftp or file URIs -
# CDROMs are managed through the apt-cdrom tool.
#
# remember!  stable == sarge.  testing == etch.  unstable == sid (always).
#            non-us was removed as of the sarge release.
#
# If you are going to use stable, make sure security is enabled also.

# Main NZ mirror: Citylink (national traffic if your [ISP] peers at [APE] or [WIX], international otherwise)
deb http://ftp.nz.debian.org/debian stable main contrib non-free
deb http://ftp.nz.debian.org/debian-non-US stable/non-US main contrib non-free

# Security.  Have this enabled, always.  It's also best to use the official international
# mirror, which is an anycast address to your closest official mirror.
deb http://security.debian.org stable/updates main contrib non-free

# Volatile.  Have this enabled to get things which are obsolete in stable, such as clamav.
# Read http://volatile.debian.net/ before using this.

deb http://ftp.nz.debian.org/debian-volatile/ sarge/volatile main contrib non-free
#deb http://volatile.debian.net/debian-volatile sarge/volatile main contrib non-free

# Uncomment if you want the apt-get source function to work
#deb-src http://ftp.nz.debian.org/debian stable main contrib non-free


# ---
# Below this point are unofficial mirrors, which you might like to use if you are closer to them.

# Uncomment to use Callplus's mirror
# deb http://ftp.tranzpeer.net/debian stable main contrib non-free

# Uncomment to use debian.co.nz, hosted at Orcon:
# deb http://debian.orcon.net.nz/debian stable main contrib non-free

# Uncomment to use Inspire's mirror:
# deb http://mirror.inspire.net.nz/debian stable main contrib non-free

# Uncomment to use IHUG's mirror:
# deb http://debian.ihug.co.nz/debian stable main contrib non-free

# Uncomment to use Paradise's mirror:
# deb http://debian.paradise.net.nz/debian stable main contrib non-free

# Uncomment to use AARnet in Australia
# deb ftp://mirror.aarnet.edu.au/debian stable main contrib non-free

# Uncomment to use the "main" American source
# deb http://http.us.debian.org/debian stable main contrib non-free

Pinning your distribution

If you want to use packages from several distributions at once, see AptNotes for details on pinning packages.

Playing multimedia

To use MP3s or DVDs under Debian add the following line to your sources.list

deb http://www.debian-multimedia.org sarge main

NB This might not be legal in your country.

Also, see http://debian.video.free.fr/ if you want this for other versions of Debian or other processor architecutres than i386.

Ubuntu APT

Synaptic does a very nice job of managing your ubuntu sources list. You can add the universe and multiverse repositories with a few mouseclicks, and even add non-standard repositories without leaving the GUI.

The following URLs give you access to all of the officially supported packages in Ubuntu from the New Zealand mirrors.

nz2 and nz appear to be in different network locations, and depending on whether your ISP has a sensible peering policy, one or other may offer much better bandwidth.

Easyubuntu and automatix scripts have an option to update your sources.list too. Use this option with caution because it quite often screws up.

There's also Source-O-Matic which will build you a sources list using the official, and some of the better-known unofficial repositories. This has always worked very well for me, and is a quick and easy way to get back to a working config if you let easyubuntu or automatix break it :-)