#1082899 Cleanup should remove dpkg and debconf -old files

#1082899#3
Date:
2024-09-27 21:04:03 UTC
From:
To:
After running mmdebstrap, the following files still exist in the chroot:

/var/cache/debconf/config.dat-old
/var/cache/debconf/templates.dat-old
/var/lib/dpkg/diversions-old
/var/lib/dpkg/status-old

I think it would make sense for mmdebstrap's cleanup to remove these
files, to make a smaller chroot.

This would also eliminate some special cases in other parts of
mmdebstrap, which currently need to ignore the contents of these files.

#1082899#6
Date:
2024-09-27 21:12:44 UTC
From:
To:
Hi,

Quoting Josh Triplett (2024-09-27 23:04:03)

the reason they are still there is simple: I have no idea why they exist in the
first place. Do dpkg or debconf do anything with the *-old files? Are they
inspected or consumed by any other piece of software? Why do we need them?

Thanks!

cheers, josch

#1082899#11
Date:
2026-10-04 10:55:45 UTC
From:
To:
Hi!

For dpkg, these are backup files done any time the main file gets
modified, so that the user could go back in case of a mess up or
similar.

For the bootstrapping case, it makes sense to remove *-old inside
/var/lib/dpkg/.

Thanks,
Guillem