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

URI SPECIFICATION

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

EXAMPLES

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

SEE ALSO

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

BUGS

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

AUTHORS

511       Jason Gunthorpe
512
513       APT team
514

NOTES

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