Since February 2025, Debian 13 (Trixie) and APT introduced the deb822 format for managing APT sources. This new format replaces the traditional /etc/apt/sources.list
file with the more structured and readable /etc/apt/sources.list.d/debian.sources
file.
This change was introduced by APT, starting with an update that enabled users to run:
apt modernize-sources
This command automatically converts the old sources.list
format to the new deb822
format.
APT automatically creates a backup (/etc/apt/sources.list.bak
) and a .save
copy of the original sources.list
before making changes. This ensures that users can revert if needed.
The new format enhances maintainability, security, and flexibility by adopting a key-value pair structure inspired by RFC822-style configuration files.
The deb822 format is a structured configuration format based on the RFC822 standard. It is already used in Debian for various package-related files, such as dpkg
status files and APT preferences.
The new format improves upon the classic sources.list
syntax by making it:
- More readable: Clearly structured with key-value pairs.
- More modular: Each repository is defined in a separate block.
- More secure: Explicitly defines trusted keys.
- Easier to maintain: More flexible for future changes.
# Modernized from /etc/apt/sources.list
Types: deb deb-src
URIs: http://deb.debian.org/debian/
Suites: trixie
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
# Security updates
Types: deb deb-src
URIs: http://security.debian.org/debian-security/
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
# Updates repository
Types: deb deb-src
URIs: http://deb.debian.org/debian/
Suites: trixie-updates
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
deb http://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security/ trixie-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security/ trixie-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ trixie-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ trixie-updates main contrib non-free non-free-firmware
-
Improved Readability
- Clearly structured key-value pairs.
- Easier to edit and maintain.
-
Better Security
- The
Signed-By:
field explicitly defines which key is used for signing. - Avoids the risks of globally trusted keys in
/etc/apt/trusted.gpg
.
- The
-
Modular and Flexible
- Each repository definition is in a separate block.
- Easier to enable/disable repositories.
-
Supports Multiple Suites and Architectures
- The
Suites:
field allows multiple suites per repository. - Works well with multi-architecture systems.
- The
-
Future-Proof
- New features can be added without breaking the structure.
sudo apt modernize-sources
This command will automatically convert your sources.list
into the new deb822
format and place it in /etc/apt/sources.list.d/debian.sources
.
APT will also create backups:
/etc/apt/sources.list.bak
/etc/apt/sources.list.save
These backups allow you to revert changes if necessary.
Open the generated file to check its correctness:
sudo nano /etc/apt/sources.list.d/debian.sources
sudo apt update
The transition to deb822 for APT sources in Debian Trixie is a major improvement. It makes managing repositories clearer, more secure, and more flexible. Debian has simplified the migration by adding the apt modernize-sources
command, making it easier for users to switch.
Since APT automatically creates backups, users can safely migrate to deb822 without the risk of losing their original configuration.
All users are encouraged to update their APT sources to take advantage of these improvements.
For more information, refer to the Debian APT documentation.