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
165Architectures (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
170Languages (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
175Targets (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
183PDiffs (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
192By-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
209Allow-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
215Trusted (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
227Signed-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. The option may also be set
244           directly to an embedded GPG public key block. Special care is
245           needed to encode the empty line with leading spaces and ".":
246
247               Types: deb
248               URIs: https://deb.debian.org
249               Suites: stable
250               Components: main contrib non-free
251               Signed-By:
252                -----BEGIN PGP PUBLIC KEY BLOCK-----
253                .
254                mDMEYCQjIxYJKwYBBAHaRw8BAQdAD/P5Nvvnvk66SxBBHDbhRml9ORg1WV5CvzKY
255                CuMfoIS0BmFiY2RlZoiQBBMWCgA4FiEErCIG1VhKWMWo2yfAREZd5NfO31cFAmAk
256                IyMCGyMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQREZd5NfO31fbOwD6ArzS
257                dM0Dkd5h2Ujy1b6KcAaVW9FOa5UNfJ9FFBtjLQEBAJ7UyWD3dZzhvlaAwunsk7DG
258                3bHcln8DMpIJVXht78sL
259                =IE0r
260                -----END PGP PUBLIC KEY BLOCK-----
261
262
263Check-Valid-Until (check-valid-until) is a yes/no value which
264           controls if APT should try to detect replay attacks. A repository
265           creator can declare a time until which the data provided in the
266           repository should be considered valid, and if this time is reached,
267           but no new data is provided, the data is considered expired and an
268           error is raised. Besides increasing security, as a malicious
269           attacker can't send old data forever to prevent a user from
270           upgrading to a new version, this also helps users identify mirrors
271           which are no longer updated. However, some repositories such as
272           historic archives are not updated any more by design, so this check
273           can be disabled by setting this option to no. Defaults to the value
274           of configuration option Acquire::Check-Valid-Until which itself
275           defaults to yes.
276
277Valid-Until-Min (valid-until-min) and Valid-Until-Max
278           (valid-until-max) can be used to raise or lower the time period in
279           seconds in which the data from this repository is considered valid.
280           -Max can be especially useful if the repository provides no
281           Valid-Until field on its Release file to set your own value, while
282           -Min can be used to increase the valid time on seldom updated
283           (local) mirrors of a more frequently updated but less accessible
284           archive (which is in the sources.list as well) instead of disabling
285           the check entirely. Default to the value of the configuration
286           options Acquire::Min-ValidTime and Acquire::Max-ValidTime which are
287           both unset by default.
288
289Check-Date (check-date) is a yes/no value which controls if APT
290           should consider the machine's time correct and hence perform time
291           related checks, such as verifying that a Release file is not from
292           the future. Disabling it also disables the Check-Valid-Until option
293           mentioned above.
294
295Date-Max-Future (date-max-future) controls how far from the future
296           a repository may be. Default to the value of the configuration
297           option Acquire::Max-FutureTime which is 10 seconds by default.
298
299InRelease-Path (inrelease-path) determines the path to the
300           InRelease file, relative to the normal position of an InRelease
301           file. By default, this option is unset and APT will try to fetch an
302           InRelease or, if that fails, a Release file and its associated
303           Release.gpg file. By setting this option, the specified path will
304           be tried instead of the InRelease file, and the fallback to Release
305           files will be disabled.
306
307

URI SPECIFICATION

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

EXAMPLES

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

SEE ALSO

500       apt-get(8), apt.conf(5),
501       /usr/share/doc/apt/acquire-additional-files.md.gz
502

BUGS

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

AUTHORS

508       Jason Gunthorpe
509
510       APT team
511

NOTES

513        1. APT bug page
514           http://bugs.debian.org/src:apt
515
516
517
518APT 2.3.11                       09 June 2021                  SOURCES.LIST(5)
Impressum