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.

According to https://www.reddit.com/r/debian/comments/1ij82ce/debian_13_trixie_introduced_deb822_heres_what_you/ in Debian trixie there is:

sudo apt modernize-sources

That might be helpful.

I’d wait to do this until Trixie. Both Ubuntu and Debian didn’t move to it by default at first, and I worry it could cause problems if we try to move existing systems to this format for consistency. Once we migrate to Trixie, this would probably be a good idea. Ubuntu is using this by default since at least 24.04.

1 Like