sources.list man page

sources.list — Package resource list for APT


The package resource list is used to locate archives of the package distribution system in use on the system. This control file is located in /etc/apt/sources.list and additionally any files ending with ".list" in /etc/apt/sources.list.d are included.

The source list is designed to support any number of active sources and a variety of source media.  The file lists one source per line, with the most preferred source listed first.  The format of each line is: type uri args.  The first item, type, determines the format for args.  uri is a Universal Resource Identifier (URI), which is a superset of the more specific and well-known Universal Resource Locator, or URL.  The rest of the line can be marked as a comment by using a #.

The generic format of sources.list entry is:

type baseuri distribution [component comp2 ...]

Type is one of the types explained below.  Baseuri is the URI to the root of the given distribution.  Distribution points to a given distribution name, version and architecture.  The splitting of URI into baseuri and distribution parts should be done in a way that allows pointing the baseuri to another mirror without touching distribution. Some types additionally support a component-entry.

The following variable substitutions are done on sources.list entries: $(ARCH) is substituted with the base architecture of the system.

$(VERSION) is substituted with the distribution version if configured automatically via Apt::DistroVerPkg or manually via the Apt::DistroVersion configuration option.

The Repomd and Repomd-Src Types

The format of repomd and repomd-src sources.list entries is:

repomd baseuri distribution

repomd-src baseuri distribution

Repomd repositories do not support a concept of "components"!

The RPM and Rpm-Src Types

The format of rpm and rpm-src sources.list entries is:

rpm baseuri distribution component [comp2 ...]

rpm-src baseuri distribution component [comp2 ...]

At least one component must be specified for rpm and rpm-src repositories.

The Rpm-Dir and Rpm-Src-Dir Types

The format of rpm-dir and rpm-src-dir sources.list entries is:

rpm-dir baseuri distribution component [comp2 ...]

rpm-src-dir baseuri distribution component [comp2 ...]

At least one component must be specified for rpm and rpm-src repositories.  rpm-dir and rpm-src-dir only accept file:// uri's!

URI Specification

The currently recognized URI types are cdrom, file, http, and ftp.


The file scheme allows an arbitrary directory in the file system to be considered an archive.  This is useful for NFS mounts and local mirrors or archives.


The cdrom scheme allows APT to use a local CDROM drive with media swapping.  Use the apt-cdrom(8) program to create cdrom entries in the source list.


The http scheme specifies an HTTP server for the archive.  If the "http_proxy" environment variable is set with the format "http://server:port/", the proxy server specified in "http_proxy" will be used.  Users of authenticated HTTP/1.1 proxies may use a string of the format "http://user:pass@server:port/".  Note that this is an insecure method of authentication.


The ftp scheme specifies an FTP server for the archive.  APT's FTP behavior is highly configurable; for more information see the apt.conf(5) manual page.  Please note that a ftp proxy can be specified by using the "ftp_proxy" environment variable.  It is possible to specify a http proxy (http proxy servers often understand ftp urls) using this method and ONLY this method.  ftp proxies using http specified in the configuration file will be ignored.


The copy scheme is identical to the file scheme except that packages are copied into the cache directory instead of used directly at their location. This is useful for people using a zip disk to copy files around with APT.


See below.


The rsh/ssh method invokes rsh/ssh to connect to a remote host as a given user and access the files.  No password authentication is  possible, prior arrangements with RSA keys or rhosts must have been made. Access to files on the remote uses standard find(1) and dd(P)  commands to perform the file transfers from the remote.


Repomd entries for Fedora Core, Extras and Updates using variable substitution, assumes Apt::DistroVerPkg is set to "fedora-release":

repomd fedora/linux/core/$(VERSION)/$(ARCH)/os/
repomd fedora/linux/extras/$(VERSION)/$(ARCH)/
repomd fedora/linux/core/updates/$(VERSION)/$(ARCH)/

Local mirror (local disk, NFS mounted etc) of Fedora Core at  /var/www/html/fedora/

repomd file:/var/www/html fedora/linux/core/$(VERSION)/$(ARCH)/

See Also

apt-cache(8) apt.conf(5)


Reporting bugs in APT-RPM is best done in the APT-RPM mailinglist at


Maintainer and contributor information can be found in the credits page of APT-RPM.

Referenced By

apt(8), apt-cache(8), apt-cdrom(8), apt-get(8), apt_preferences(5), dselect(1), pbuilder(8), pbuilderrc(5), vendors.list(5).

14 Jun 2006 APT-RPM