https://wiki.debian.org/SourcesList
However, there is another way: deb822(5).
This is explained further in sources.list(5):
Anyway, enough of the waffle, first remove the original sources:sources.list(5) wrote:This is a new format supported by apt itself since version 1.1. Previous versions ignore such files with a notice message as described earlier. It is intended to make this format gradually the default format, deprecating the previously described one-line-style format, as it is easier to create, extend and modify for humans and machines alike especially if a lot of sources and/or options are involved. Developers who are working with and/or parsing apt sources are highly encouraged to add support for this format and to contact the APT team to coordinate and share this work. Users can freely adopt this format already, but may encounter problems with software not supporting the format yet.
Code: Select all
# mv /etc/apt/sources.list{,.bak}
Code: Select all
# tee /etc/apt/sources.list.d/debian.sources <<!
Types: deb
URIs: https://cdn-aws.deb.debian.org/debian
Suites: stretch stretch-updates
Components: main
Types: deb
URIs: https://cdn-aws.deb.debian.org/debian-security
Suites: stretch/updates
Components: main
!
Now update and check the sources:
Code: Select all
root@hegel:~ # apt update
Ign:1 https://cdn-aws.deb.debian.org/debian stretch InRelease
Get:2 https://cdn-aws.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Hit:3 https://cdn-aws.deb.debian.org/debian-security stretch/updates InRelease
Hit:4 https://cdn-aws.deb.debian.org/debian stretch Release
Fetched 91.0 kB in 1s (64.6 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root@hegel:~ # apt policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 https://cdn-aws.deb.debian.org/debian-security stretch/updates/main amd64 Packages
release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64
origin cdn-aws.deb.debian.org
500 https://cdn-aws.deb.debian.org/debian stretch-updates/main amd64 Packages
release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
origin cdn-aws.deb.debian.org
500 https://cdn-aws.deb.debian.org/debian stretch/main amd64 Packages
release v=9.5,o=Debian,a=stable,n=stretch,l=Debian,c=main,b=amd64
origin cdn-aws.deb.debian.org
Pinned packages:
root@hegel:~ #