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://deb.debian.org/debian bullseye-updates main contrib non-free
141           deb http://deb.debian.org/debian-security bullseye-security main contrib non-free
142
143       or like this in deb822 style format:
144
145           Types: deb
146           URIs: http://deb.debian.org/debian
147           Suites: bullseye bullseye-updates
148           Components: main contrib non-free
149
150           Types: deb
151           URIs: http://deb.debian.org/debian-security
152           Suites: bullseye-security
153           Components: main contrib non-free
154

THE DEB AND DEB-SRC TYPES: OPTIONS

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

URI SPECIFICATION

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

EXAMPLES

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

SEE ALSO

504       apt-get(8), apt.conf(5),
505       /usr/share/doc/apt/acquire-additional-files.md.gz
506

BUGS

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

AUTHORS

512       Jason Gunthorpe
513
514       APT team
515

NOTES

517        1. APT bug page
518           http://bugs.debian.org/src:apt
519
520
521
522APT 2.5.5                      22 February 2022                SOURCES.LIST(5)
Impressum