1SOURCES.LIST(5)                       APT                      SOURCES.LIST(5)
2
3
4

NAME

6       sources.list - List of configured APT data sources
7

DESCRIPTION

9       The source list /etc/apt/sources.list and the files contained in
10       /etc/apt/sources.list.d/ are designed to support any number of active
11       sources and a variety of source media. The files list one source per
12       line (one-line style) or contain multiline stanzas defining one or more
13       sources per stanza (deb822 style), with the most preferred source
14       listed first (in case a single version is available from more than one
15       source). The information available from the configured sources is
16       acquired by apt-get update (or by an equivalent command from another
17       APT front-end).
18

SOURCES.LIST.D

20       The /etc/apt/sources.list.d directory provides a way to add
21       sources.list entries in separate files. Two different file formats are
22       allowed as described in the next two sections. Filenames need to have
23       either the extension .list or .sources depending on the contained
24       format. The filenames may only contain letters (a-z and A-Z), digits
25       (0-9), underscore (_), hyphen (-) and period (.) characters. Otherwise
26       APT will print a notice that it has ignored a file, unless that file
27       matches a pattern in the Dir::Ignore-Files-Silently configuration list
28       - in which case it will be silently ignored.
29

ONE-LINE-STYLE FORMAT

31       Files in this format have the extension .list. Each line specifying a
32       source starts with a type (e.g.  deb-src) followed by options and
33       arguments for this type. Individual entries cannot be continued onto a
34       following line. Empty lines are ignored, and a # character anywhere on
35       a line marks the remainder of that line as a comment. Consequently an
36       entry can be disabled by commenting out the entire line. If options
37       should be provided they are separated by spaces and all of them
38       together are enclosed by square brackets ([]) included in the line
39       after the type separated from it with a space. If an option allows
40       multiple values these are separated from each other with a comma (,).
41       An option name is separated from its value(s) by an equals sign (=).
42       Multivalue options also have -= and += as separators, which instead of
43       replacing the default with the given value(s) modify the default
44       value(s) to remove or include the given values.
45
46       This is the traditional format and supported by all apt versions. Note
47       that not all options as described below are supported by all apt
48       versions. Note also that some older applications parsing this format on
49       their own might not expect to encounter options as they were uncommon
50       before the introduction of multi-architecture support.
51

DEB822-STYLE FORMAT

53       Files in this format have the extension .sources. The format is similar
54       in syntax to other files used by Debian and its derivatives, such as
55       the metadata files that apt will download from the configured sources
56       or the debian/control file in a Debian source package. Individual
57       entries are separated by an empty line; additional empty lines are
58       ignored, and a # character at the start of the line marks the entire
59       line as a comment. An entry can hence be disabled by commenting out
60       each line belonging to the stanza, but it is usually easier to add the
61       field "Enabled: no" to the stanza to disable the entry. Removing the
62       field or setting it to yes re-enables it. Options have the same syntax
63       as every other field: A field name separated by a colon (:) and
64       optionally spaces from its value(s). Note especially that multiple
65       values are separated by whitespaces (like spaces, tabs and newlines),
66       not by commas as in the one-line format. Multivalue fields like
67       Architectures also have Architectures-Add and Architectures-Remove to
68       modify the default value rather than replacing it.
69
70       This is a new format supported by apt itself since version 1.1.
71       Previous versions ignore such files with a notice message as described
72       earlier. It is intended to make this format gradually the default
73       format, deprecating the previously described one-line-style format, as
74       it is easier to create, extend and modify for humans and machines alike
75       especially if a lot of sources and/or options are involved. Developers
76       who are working with and/or parsing apt sources are highly encouraged
77       to add support for this format and to contact the APT team to
78       coordinate and share this work. Users can freely adopt this format
79       already, but may encounter problems with software not supporting the
80       format yet.
81

THE DEB AND DEB-SRC TYPES: GENERAL FORMAT

83       The deb type references a typical two-level Debian archive,
84       distribution/component. The distribution is generally a suite name like
85       stable or testing or a codename like bullseye or bookworm while
86       component is one of main, contrib or non-free. The deb-src type
87       references a Debian distribution's source code in the same form as the
88       deb type. A deb-src line is required to fetch source indexes.
89
90       The format for two one-line-style entries using the deb and deb-src
91       types is:
92
93           deb [ option1=value1 option2=value2 ] uri suite [component1] [component2] [...]
94           deb-src [ option1=value1 option2=value2 ] uri suite [component1] [component2] [...]
95
96       Alternatively the equivalent entry in deb822 style looks like this:
97
98                Types: deb deb-src
99                URIs: uri
100                Suites: suite
101                Components: [component1] [component2] [...]
102                option1: value1
103                option2: value2
104
105
106       The URI for the deb type must specify the base of the Debian
107       distribution, from which APT will find the information it needs.  suite
108       can specify an exact path, in which case the components must be omitted
109       and suite must end with a slash (/). This is useful for the case when
110       only a particular sub-directory of the archive denoted by the URI is of
111       interest. If suite does not specify an exact path, at least one
112       component must be present.
113
114       suite may also contain a variable, $(ARCH) which expands to the Debian
115       architecture (such as amd64 or armel) used on the system. This permits
116       architecture-independent sources.list files to be used. In general this
117       is only of interest when specifying an exact path; APT will
118       automatically generate a URI with the current architecture otherwise.
119
120       Especially in the one-line-style format since only one distribution can
121       be specified per line it may be necessary to have multiple lines for
122       the same URI, if a subset of all available distributions or components
123       at that location is desired. APT will sort the URI list after it has
124       generated a complete set internally, and will collapse multiple
125       references to the same Internet host, for instance, into a single
126       connection, so that it does not inefficiently establish a connection,
127       close it, do something else, and then re-establish a connection to that
128       same host. APT also parallelizes connections to different hosts to more
129       effectively deal with sites with low bandwidth.
130
131       It is important to list sources in order of preference, with the most
132       preferred source listed first. Typically this will result in sorting by
133       speed from fastest to slowest (CD-ROM followed by hosts on a local
134       network, followed by distant Internet hosts, for example).
135
136       As an example, the sources for your distribution could look like this
137       in one-line-style format:
138
139           deb http://deb.debian.org/debian bullseye main contrib non-free
140           deb http://security.debian.org bullseye-security main contrib non-free
141
142       or like this in deb822 style format:
143
144           Types: deb
145           URIs: http://deb.debian.org/debian
146           Suites: bullseye
147           Components: main contrib non-free
148
149           Types: deb
150           URIs: http://security.debian.org
151           Suites: bullseye-security
152           Components: main contrib non-free
153

THE DEB AND DEB-SRC TYPES: OPTIONS

155       Each source entry can have options specified to modify which source is
156       accessed and how data is acquired from it. Format, syntax and names of
157       the options vary between the one-line-style and deb822-style formats as
158       described, but they both have the same options available. For
159       simplicity we list the deb822 field name and provide the one-line name
160       in brackets. Remember that besides setting multivalue options
161       explicitly, there is also the option to modify them based on the
162       default, but we aren't listing those names explicitly here. Unsupported
163       options are silently ignored by all APT versions.
164
165       ·   Architectures (arch) is a multivalue option defining for which
166           architectures information should be downloaded. If this option
167           isn't set the default is all architectures as defined by the
168           APT::Architectures config option.
169
170       ·   Languages (lang) is a multivalue option defining for which
171           languages information such as translated package descriptions
172           should be downloaded. If this option isn't set the default is all
173           languages as defined by the Acquire::Languages config option.
174
175       ·   Targets (target) is a multivalue option defining which download
176           targets apt will try to acquire from this source. If not specified,
177           the default set is defined by the Acquire::IndexTargets
178           configuration scope (targets are specified by their name in the
179           Created-By field). Additionally, targets can be enabled or disabled
180           by using the Identifier field as an option with a boolean value
181           instead of using this multivalue option.
182
183       ·   PDiffs (pdiffs) is a yes/no value which controls if APT should try
184           to use PDiffs to update old indexes instead of downloading the new
185           indexes entirely. The value of this option is ignored if the
186           repository doesn't announce the availability of PDiffs. Defaults to
187           the value of the option with the same name for a specific index
188           file defined in the Acquire::IndexTargets scope, which itself
189           defaults to the value of configuration option Acquire::PDiffs which
190           defaults to yes.
191
192       ·   By-Hash (by-hash) can have the value yes, no or force and controls
193           if APT should try to acquire indexes via a URI constructed from a
194           hashsum of the expected file instead of using the well-known stable
195           filename of the index. Using this can avoid hashsum mismatches, but
196           requires a supporting mirror. A yes or no value activates/disables
197           the use of this feature if this source indicates support for it,
198           while force will enable the feature regardless of what the source
199           indicates. Defaults to the value of the option of the same name for
200           a specific index file defined in the Acquire::IndexTargets scope,
201           which itself defaults to the value of configuration option
202           Acquire::By-Hash which defaults to yes.
203
204       Furthermore, there are options which if set affect all sources with the
205       same URI and Suite, so they have to be set on all such entries and can
206       not be varied between different components. APT will try to detect and
207       error out on such anomalies.
208
209       ·   Allow-Insecure (allow-insecure), Allow-Weak (allow-weak) and
210           Allow-Downgrade-To-Insecure (allow-downgrade-to-insecure) are
211           boolean values which all default to no. If set to yes they
212           circumvent parts of apt-secure(8) and should therefore not be used
213           lightly!
214
215       ·   Trusted (trusted) is a tri-state value which defaults to APT
216           deciding if a source is considered trusted or if warnings should be
217           raised before e.g. packages are installed from this source. This
218           option can be used to override that decision. The value yes tells
219           APT always to consider this source as trusted, even if it doesn't
220           pass authentication checks. It disables parts of apt-secure(8), and
221           should therefore only be used in a local and trusted context (if at
222           all) as otherwise security is breached. The value no does the
223           opposite, causing the source to be handled as untrusted even if the
224           authentication checks passed successfully. The default value can't
225           be set explicitly.
226
227       ·   Signed-By (signed-by) is an option to require a repository to pass
228           apt-secure(8) verification with a certain set of keys rather than
229           all trusted keys apt has configured. It is specified as a list of
230           absolute paths to keyring files (have to be accessible and readable
231           for the _apt system user, so ensure everyone has read-permissions
232           on the file) and fingerprints of keys to select from these
233           keyrings. If no keyring files are specified the default is the
234           trusted.gpg keyring and all keyrings in the trusted.gpg.d/
235           directory (see apt-key fingerprint). If no fingerprint is specified
236           all keys in the keyrings are selected. A fingerprint will accept
237           also all signatures by a subkey of this key, if this isn't desired
238           an exclamation mark (!) can be appended to the fingerprint to
239           disable this behaviour. The option defaults to the value of the
240           option with the same name if set in the previously acquired Release
241           file of this repository (only fingerprints can be specified there
242           through). Otherwise all keys in the trusted keyrings are considered
243           valid signers for this repository.
244
245       ·   Check-Valid-Until (check-valid-until) is a yes/no value which
246           controls if APT should try to detect replay attacks. A repository
247           creator can declare a time until which the data provided in the
248           repository should be considered valid, and if this time is reached,
249           but no new data is provided, the data is considered expired and an
250           error is raised. Besides increasing security, as a malicious
251           attacker can't send old data forever to prevent a user from
252           upgrading to a new version, this also helps users identify mirrors
253           which are no longer updated. However, some repositories such as
254           historic archives are not updated any more by design, so this check
255           can be disabled by setting this option to no. Defaults to the value
256           of configuration option Acquire::Check-Valid-Until which itself
257           defaults to yes.
258
259       ·   Valid-Until-Min (valid-until-min) and Valid-Until-Max
260           (valid-until-max) can be used to raise or lower the time period in
261           seconds in which the data from this repository is considered valid.
262           -Max can be especially useful if the repository provides no
263           Valid-Until field on its Release file to set your own value, while
264           -Min can be used to increase the valid time on seldom updated
265           (local) mirrors of a more frequently updated but less accessible
266           archive (which is in the sources.list as well) instead of disabling
267           the check entirely. Default to the value of the configuration
268           options Acquire::Min-ValidTime and Acquire::Max-ValidTime which are
269           both unset by default.
270
271       ·   Check-Date (check-date) is a yes/no value which controls if APT
272           should consider the machine's time correct and hence perform time
273           related checks, such as verifying that a Release file is not from
274           the future. Disabling it also disables the Check-Valid-Until option
275           mentioned above.
276
277       ·   Date-Max-Future (date-max-future) controls how far from the future
278           a repository may be. Default to the value of the configuration
279           option Acquire::Max-FutureTime which is 10 seconds by default.
280
281       ·   InRelease-Path (inrelease-path) determines the path to the
282           InRelease file, relative to the normal position of an InRelease
283           file. By default, this option is unset and APT will try to fetch an
284           InRelease or, if that fails, a Release file and its associated
285           Release.gpg file. By setting this option, the specified path will
286           be tried instead of the InRelease file, and the fallback to Release
287           files will be disabled.
288
289

URI SPECIFICATION

291       The currently recognized URI types are:
292
293       http (apt-transport-http(1))
294           The http scheme specifies an HTTP server for an archive and is the
295           most commonly used method. The URI can directly include login
296           information if the archive requires it, but the use of
297           apt_auth.conf(5) should be preferred. The method also supports
298           SOCKS5 and HTTP(S) proxies either configured via apt-specific
299           configuration or specified by the environment variable http_proxy
300           in the format (assuming an HTTP proxy requiring authentication)
301           http://user:pass@server:port/. The authentication details for
302           proxies can also be supplied via apt_auth.conf(5).
303
304           Note that these forms of authentication are insecure as the whole
305           communication with the remote server (or proxy) is not encrypted so
306           a sufficiently capable attacker can observe and record login as
307           well as all other interactions. The attacker can not modify the
308           communication through as APT's data security model is independent
309           of the chosen transport method. See apt-secure(8) for details.
310
311       https (apt-transport-https(1))
312           The https scheme specifies an HTTPS server for an archive and is
313           very similar in use and available options to the http scheme. The
314           main difference is that the communication between apt and server
315           (or proxy) is encrypted. Note that the encryption does not prevent
316           an attacker from knowing which server (or proxy) apt is
317           communicating with and deeper analysis can potentially still reveal
318           which data was downloaded. If this is a concern the Tor-based
319           schemes mentioned further below might be a suitable alternative.
320
321       mirror, mirror+scheme (apt-transport-mirror(1))
322           The mirror scheme specifies the location of a mirrorlist. By
323           default the scheme used for the location is http, but any other
324           scheme can be used via mirror+scheme. The mirrorlist itself can
325           contain many different URIs for mirrors the APT client can
326           transparently pick, choose and fallback between intended to help
327           both with distributing the load over the available mirrors and
328           ensuring that clients can acquire data even if some configured
329           mirrors are not available.
330
331       file
332           The file scheme allows an arbitrary directory in the file system to
333           be considered an archive. This is useful for NFS mounts and local
334           mirrors or archives.
335
336       cdrom
337           The cdrom scheme allows APT to use a local CD-ROM, DVD or USB drive
338           with media swapping. Use the apt-cdrom(8) program to create cdrom
339           entries in the source list.
340
341       ftp
342           The ftp scheme specifies an FTP server for an archive. Use of FTP
343           is on the decline in favour of http and https and many archives
344           either never offered or are retiring FTP access. If you still need
345           this method many configuration options for it are available in the
346           Acquire::ftp scope and detailed in apt.conf(5).
347
348           Please note that an FTP proxy can be specified by using the
349           ftp_proxy environment variable. It is possible to specify an HTTP
350           proxy (HTTP proxy servers often understand FTP URLs) using this
351           environment variable and only this environment variable. Proxies
352           using HTTP specified in the configuration file will be ignored.
353
354       copy
355           The copy scheme is identical to the file scheme except that
356           packages are copied into the cache directory instead of used
357           directly at their location. This is useful for people using
358           removable media to copy files around with APT.
359
360       rsh, ssh
361           The rsh/ssh method invokes RSH/SSH to connect to a remote host and
362           access the files as a given user. Prior configuration of rhosts or
363           RSA keys is recommended. The standard find and dd commands are used
364           to perform the file transfers from the remote host.
365
366       adding more recognizable URI types
367           APT can be extended with more methods shipped in other optional
368           packages, which should follow the naming scheme
369           apt-transport-method. For instance, the APT team also maintains the
370           package apt-transport-tor, which provides access methods for HTTP
371           and HTTPS URIs routed via the Tor network.
372

EXAMPLES

374       Uses the archive stored locally (or NFS mounted) at /home/apt/debian
375       for stable/main, stable/contrib, and stable/non-free.
376
377           deb file:/home/apt/debian stable main contrib non-free
378
379           Types: deb
380           URIs: file:/home/apt/debian
381           Suites: stable
382           Components: main contrib non-free
383
384       As above, except this uses the unstable (development) distribution.
385
386           deb file:/home/apt/debian unstable main contrib non-free
387
388           Types: deb
389           URIs: file:/home/apt/debian
390           Suites: unstable
391           Components: main contrib non-free
392
393       Sources specification for the above.
394
395           deb-src file:/home/apt/debian unstable main contrib non-free
396
397           Types: deb-src
398           URIs: file:/home/apt/debian
399           Suites: unstable
400           Components: main contrib non-free
401
402       The first line gets package information for the architectures in
403       APT::Architectures while the second always retrieves amd64 and armel.
404
405           deb http://deb.debian.org/debian bullseye main
406           deb [ arch=amd64,armel ] http://deb.debian.org/debian bullseye main
407
408           Types: deb
409           URIs: http://deb.debian.org/debian
410           Suites: bullseye
411           Components: main
412
413           Types: deb
414           URIs: http://deb.debian.org/debian
415           Suites: bullseye
416           Components: main
417           Architectures: amd64 armel
418
419       Uses HTTP to access the archive at archive.debian.org, and uses only
420       the hamm/main area.
421
422           deb http://archive.debian.org/debian-archive hamm main
423
424           Types: deb
425           URIs: http://archive.debian.org/debian-archive
426           Suites: hamm
427           Components: main
428
429       Uses FTP to access the archive at ftp.debian.org, under the debian
430       directory, and uses only the bullseye/contrib area.
431
432           deb ftp://ftp.debian.org/debian bullseye contrib
433
434           Types: deb
435           URIs: ftp://ftp.debian.org/debian
436           Suites: bullseye
437           Components: contrib
438
439       Uses FTP to access the archive at ftp.debian.org, under the debian
440       directory, and uses only the unstable/contrib area. If this line
441       appears as well as the one in the previous example in sources.list a
442       single FTP session will be used for both resource lines.
443
444           deb ftp://ftp.debian.org/debian unstable contrib
445
446           Types: deb
447           URIs: ftp://ftp.debian.org/debian
448           Suites: unstable
449           Components: contrib
450
451       Uses HTTP to access the archive at ftp.tlh.debian.org, under the
452       universe directory, and uses only files found under
453       unstable/binary-i386 on i386 machines, unstable/binary-amd64 on amd64,
454       and so forth for other supported architectures. [Note this example only
455       illustrates how to use the substitution variable; official debian
456       archives are not structured like this]
457
458           deb http://ftp.tlh.debian.org/universe unstable/binary-$(ARCH)/
459
460
461
462           Types: deb
463           URIs: http://ftp.tlh.debian.org/universe
464           Suites: unstable/binary-$(ARCH)/
465
466       Uses HTTP to get binary packages as well as sources from the stable,
467       testing and unstable suites and the components main and contrib.
468
469           deb http://deb.debian.org/debian stable main contrib
470           deb-src http://deb.debian.org/debian stable main contrib
471           deb http://deb.debian.org/debian testing main contrib
472           deb-src http://deb.debian.org/debian testing main contrib
473           deb http://deb.debian.org/debian unstable main contrib
474           deb-src http://deb.debian.org/debian unstable main contrib
475
476           Types: deb deb-src
477           URIs: http://deb.debian.org/debian
478           Suites: stable testing unstable
479           Components: main contrib
480

SEE ALSO

482       apt-get(8), apt.conf(5),
483       /usr/share/doc/apt/acquire-additional-files.md.gz
484

BUGS

486       APT bug page[1]. If you wish to report a bug in APT, please see
487       /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.
488

AUTHORS

490       Jason Gunthorpe
491
492       APT team
493

NOTES

495        1. APT bug page
496           http://bugs.debian.org/src:apt
497
498
499
500APT 2.1.20                       04 April 2019                 SOURCES.LIST(5)
Impressum