dpkg-scansources(1)

🌸 dpkg-scansources β€” bestie edition ✨

okay so this is the dpkg-scansources(1) page from the dpkg suite, and it is literally the tool that builds your Sources index files πŸ’… buckle up.


✨ NAME ✨

dpkg-scansources β€” the girl that creates Sources index files πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

dpkg-scansources [option...] binary-dir [override-file [path-prefix]] > Sources

that's it. that's the whole vibe check. redirect it into Sources and you're serving πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

okay so dpkg-scansources goes rummaging through the binary-dir you gave it, hunting for .dsc files πŸ•΅οΈβ€β™€οΈ those bad boys get used to build a Debian source index, and that index gets dumped to stdout. iconic.

the override-file, if you give one, does two jobs: it sets priorities in the resulting index stanzas, and it overrides the maintainer field that's sitting in the .dsc files. and yes, the file can be compressed (since dpkg 1.15.5) β€” we love a flexible queen 🫢 peep deb-override(5) for the format of this file.

⚠️ note, bestie: the override file is indexed by binary, not source packages, so there's a bit of a problem here. the current implementation uses the highest priority of all the binary packages produced by a .dsc file for the priority of the source package, and it uses the override entry for the first binary package listed in the .dsc file to modify maintainer information. this might change. so like… don't build your whole personality on it 😭

the path-prefix, if given, gets prepended to the directory field in the generated source index. you generally use this to make the directory fields contain the path from the top of the Debian archive hierarchy. very "know your roots" of you 🌈

⚠️ another note: if you want to access the generated Sources file with apt(8) you will probably need to compress the file with gzip(1) (generating a Sources.gz file). apt(8) ignores uncompressed Sources files except on local access (i.e. file:// sources). no cap, it will simply not see them πŸ’€

πŸ’… OPTIONS πŸ’…

  • -n, --no-sort β€” do not sort the index stanzas. normally they're sorted by source package name. choose chaos πŸŒ€
  • -e, --extra-override file β€” scan file to find supplementary overrides. the file can be compressed (since dpkg 1.15.5). see deb-extra-override(5) for more info on its format. supported since dpkg 1.15.4 πŸ“
  • -s, --source-override file β€” use file as the source override file. the file can be compressed (since dpkg 1.15.5). the default is the name of the override file you specified with .src appended. the source override file is in a different format from the binary override file β€” it contains only two whitespace-separated fields, the first is the source package name and the second is the section. blank lines and comment lines are ignored in the normal manner. if a package appears in both files, the source override takes precedence for setting the section. she said "i'll handle it" and she did πŸ‘‘
  • --debug β€” turn debugging on. give the people (and the logs) what they want πŸ”₯
  • --help β€” show the usage message and exit. the classic escape hatch πŸ™ˆ
  • --version β€” show the version and exit. hi bestie, what's your sign (it's a number) ⭐

🌸 ENVIRONMENT 🌸

  • DPKG_COLORS β€” sets the color mode. the currently accepted values are: auto (default), always and never. supported since dpkg 1.18.5. yes you can force the pretty πŸ’œ
  • DPKG_NLS β€” if set, it will be used to decide whether to activate Native Language Support, also known as internationalization (or i18n) support. the accepted values are: 0 and 1 (default). supported since dpkg 1.19.0. translating the manual is main character energy 🧚

πŸŽ€ SEE ALSO πŸŽ€

deb-override(5), deb-extra-override(5), dpkg-scanpackages(1). read them, love them, link them in the group chat πŸ’–


and that's the whole page, bestie 🫢 this was dpkg-scansources(1) from the dpkg suite, version 1.23.11-dirty, dated 2026-09-09. go make some gorgeous Sources.gz files, slay, and remember: sort your stanzas unless you're feeling feral πŸ’…βœ¨

πŸ“¦ where this page comes from