Skip to content

Debian 11 (bullseye) backports repository is deprecated but still included in sources.list template #6873

@challvy

Description

@challvy

Description

The Debian 11 (bullseye) backports repository has been deprecated, but cloud-init continues to generate it in /etc/apt/sources.list when provisioning Debian 11 systems. This causes APT warnings and potential package installation issues.

For example, Debian 12 'bookworm' was released on June 10th 2023, so bullseye-backports for Debian 11 'bullseye' was closed on June 10th 2024.

Steps to Reproduce

  1. Deploy a Debian 11 (bullseye) instance using cloud-init
  2. Check /etc/apt/sources.list
  3. Observe that bullseye-backports repository is included

Current Behavior

The template /etc/cloud/templates/sources.list.debian.tmpl generates backports repository for all Debian versions including bullseye:

deb http://deb.debian.org/debian bullseye-backports main
deb-src http://deb.debian.org/debian bullseye-backports main

Expected Behavior

Debian 11 (bullseye) and later versions should NOT include the backports repository since it has been deprecated by the Debian project.

Proposed Fix

Modify templates/sources.list.debian.tmpl to conditionally exclude backports for Debian 11 (bullseye):

{% if codename != 'bullseye' %}deb {{mirror}} {{codename}}-backports main
{% endif %}{% if codename != 'bullseye' %}deb-src {{mirror}} {{codename}}-backports main
{% endif %}

Impact

  • Affected versions: Debian 11 (bullseye)
  • Unaffected versions: Debian 10 (buster) and earlier, Debian 12 (bookworm) and later
  • Severity: Medium - causes APT warnings and repository errors

Additional Context

  • Debian 11 backports repository was officially deprecated
  • Users experience APT errors: The repository 'http://deb.debian.org/debian bullseye-backports Release' does not have a Release file
  • This affects all cloud-init deployments on Debian 11 that use the default apt configuration

Environment

  • cloud-init version: 25.1.3
  • Distribution: Debian 11 (bullseye)
  • Template file: templates/sources.list.debian.tmpl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions