configuration

APT deb822 sources — Repository selection

A .sources file uses deb822 stanzas separated by blank lines. Types selects binary or source packages; URIs selects archive locations; Suites selects distribution branches; Components selects subdivisions. Signed-By restricts accepted repository signing keys: use a verified keyring readable by the APT sandbox user. Enabled: no disables a stanza; absent means enabled. Legacy .list entries coexist with .sources files. Source order can break ties for identical versions; APT preferences and version selection are separate. Conflicting options for the same archive and suite can be rejected. Do not substitute the example domain or keyring into production. Keep the previous source file, review the intended release and signing-key fingerprint, validate offline, then perform an authorized metadata refresh and inspect package policy. Restoring sources does not undo already-installed packages.

Formal Syntax & Structure

linux syntaxlinux
Types: debURIs: https://repo.example/debianSuites: stableComponents: mainSigned-By: /usr/share/keyrings/example.gpgEnabled: no

Parameters & Attributes

NameTypeDescription
Typesdirective or fielddeb or deb-src
URIsdirective or fieldArchive base addresses
Suitesdirective or fieldSuite or exact archive path
Componentsdirective or fieldArchive subdivisions for ordinary suites
Signed-Bydirective or fieldScoped trusted keyring or fingerprint
Enableddirective or fieldEnable or disable stanza

Return Value

configuration or inspection

Repository declarations; no signature or connectivity proof.

Working Example

Example Snippetlinux
set -eud=$(mktemp -d)trap 'rm -rf -- "$d"' EXITmkdir "$d/parts" "$d/lists"cat > "$d/parts/demo.sources" <<'EOF'Types: debURIs: https://repo.example/debianSuites: stableComponents: mainSigned-By: /usr/share/keyrings/example.gpgEOFapt-get -o Dir::Etc::sourcelist=/dev/null -o Dir::Etc::sourceparts="$d/parts" -o Dir::State::lists="$d/lists" indextargets --no-release-info > "$d/targets"grep -F 'https://repo.example/debian/dists/stable/main/' "$d/targets" >/dev/nullprintf 'private source parsed; no metadata fetched\n'
Linux Reference