Sample Header Ad - 728x90

Use of “DEB822” format and ".sources" files in Debian in the future, anything else important to consider in advance?

3 votes
1 answer
412 views
After my question about a complete list for the Debian 12 sources.list, I was referred from @Stephen Kitt from the old format to the new format DEB822-STYLE FORMAT : >It’s best to use a “DEB822” format file (with a .sources extension rather than .list); for Debian 12, this means /etc/apt/sources.list.d/debian.sources. - All available Debian 12 repository entries for /etc/apt/sources.list from official Debian servers I also found the following: ***Translated from German*** >Defining the same repository in both formats is currently not allowed, unless one of the entries is commented out with #. > It is still unclear whether deb822 will become mandatory as early as summer with Debian 13 "Trixie". For that, APT 3.0 would first need to be released as a stable version. - Debian is implementing deb822 for the sources list. >Tools like apt-add-repository, apt-source, and software-properties-gtk are designed to work with .sources files (Deb822 format) for specifying APT repository information. While it's true that older releases of Ubuntu and Debian primarily used .list files, the Deb822 format is the standard in newer versions, including Ubuntu 24.04 and later. - APT deb822 sources by default - Ubuntu 24.04 APT - Specify Architecture Using .sources Files - curtin 23.1.1 documentation » APT Source - Using gpg Instead of apt-key and add-apt-repository - Software Sources is not compatible with deb822 - Support DEB822 format for source lists **Additionally:** - I can store everything in a single file - The format is deb822 (file extension .sources) - Multiple entries (stanzas) are allowed in one file - Each entry starts with a new Types: line However, I can also save the repository categories (as I had them in the classic sources.list ) as separate files like main.sources or non-free.sources, and either comment them out or deactivate them by renaming the file extension, since APT will ignore files that do not end in .sources. - How to use multiple options in apt sources.list? - Explanation of the DEB822 Source Format - deb822(5) - Linux manual page - DEB822 style /etc/apt/sources.list? - RFC822-style sources.list yields "E: Type 'Types:' is not known" > Since apt version 2.9.26, you can run apt modernize-sources as root to automatically rewrite the .list files and converting them to .source files, as long as they are valid already. Otherwise versions 2.3.10 or later supports the new format and can be manually modified. - Migrating all my third party repositories sources.list to deb822-style Is all of that correct so far, and does it actually make sense to split everything like that or is it unnecessary? Is there anything else important to consider in advance if you switch everything over now?
Asked by ReflectYourCharacter (8185 rep)
May 28, 2025, 08:50 AM
Last activity: Jun 13, 2025, 03:24 PM