This page gathers information about two related issues:

mass-bug-filings were done for both issues in August 2023.

Please help improve this page!

Discussion on debian-devel@l.d.o:

Context: Debian Policy section 4.9

  clean (required)
     This must undo any effects that the build and binary targets may
     have had, except that it should leave alone any output files
     created in the parent directory by a run of a binary target.

How to reproduce

using dpkg-buildpackage

source build:

dpkg-buildpackage -b && dpkg-buildpackage -S

binary build:

dpkg-buildpackage -b && dpkg-buildpackage -b

using sbuild

source build:

sbuild -A -d unstable -v --no-run-lintian \
--finished-build-commands="cd %SBUILD_PKGBUILD_DIR && runuser -u $(id -un) -- dpkg-buildpackage --sanitize-env -us -uc -rfakeroot -S" \

binary build:

sbuild -A -d unstable -v --no-run-lintian \
--finished-build-commands="cd %SBUILD_PKGBUILD_DIR && runuser -u $(id -un) -- dpkg-buildpackage --sanitize-env -us -uc -rfakeroot -b" \

using pbuilder

pbuilder build --twice

Common issues (and ways to solve them)

        # ignore changes on config.{sub,guess}
        extend-diff-ignore = "(^|/)(config.sub|config.guess)$"

using Salsa CI

Salsa CI include an opt-in test job to check how a package build twice in a row. Instructions to use it can be found at

Preventing future issues

sbuild users can easily integrate a clean-up validation step in their packaging workflow. Guidance on how to set this up is given on the sbuild wiki page.

All bugs