APT sources.list One-Line Format versus DEB822-Style Format

ONE-LINE-STYLE FORMAT

deb [signed-by=/usr/share/keyrings/derivative.asc] https://deb.kicksecure.com bookworm main contrib non-free

shell command:

echo "deb [signed-by=/usr/share/keyrings/derivative.asc] https://deb.kicksecure.com bookworm main contrib non-free" | sudo tee /etc/apt/sources.list.d/derivative.list

DEB822-STYLE FORMAT

Uris: https://deb.kicksecure.com
Types: deb deb-src
Suites: bullseye
Components: main contrib non-free
Signed-By: /usr/share/keyrings/derivative.asc

shell command:

echo "\
Uris: https://deb.kicksecure.com
Types: deb deb-src
Suites: bookworm
Components: main contrib non-free
Signed-By: /usr/share/keyrings/derivative.asc
" | sudo tee /etc/apt/sources.list.d/derivative.list

DEB822 format is

  • supported since Debian bookworm,
  • used by extrepo,
  • supported by mmdebstrap.

In my opinion, the resulting configuration files /etc/apt/sources.list.d look nicer in DEB822 format. Seems easier to modify.

However, in manual repository adding instructions, one-line style format seems easier for copy and paste.

Probably best to avoid implementing this until Debian moves to DEB822 format by default, if that ever happens. There’s no rush in doing this at all.