I'm about to upgrade from Debian 10 to 11.
During this step, and like when I do common apt-get upgrade or dist-upgrade, I'm expecting to receive a lot of questions: "Do you want to replace or to keep your configurations files?"

And having little knowledge (or absolutely no, sometimes) about the goals and the effects of most packages that are asking for this, a diff won't help me. What is the default response you recommend to answer, when you "know nothing"?

Y : replace configurations file
N : keep them
press Enter key, to use the default answer suggested?

1 Answer 1


Most of the time, keeping your current configuration is the best option - you generally want an upgrade to be providing the same functionality in pretty much the same way, and you generally don't want to lose any hand-crafted configuration changes. That's why it's the default.

It's extremely rare for an upgraded program to have a completely incompatible config file, which is about the only time that keeping the old config will prevent an upgraded service from running....and even in that case, you generally don't want it to run until you've gone over the new config and made sure it's going to do what you want it to - especially, if what you want differs from the default.

You can always change your mind later, anyway. Debian packages don't just replace listed conffiles. If you choose to overwrite your current config, it keeps the old config file renamed to end with .dpkg-old. If you choose to keep your current config, it renames the suggested new config file to end with .dpkg-dist. You can manually copy one of those over the config file at any time.

NOTE: a conffile isn't necessarily a configuration file. Nor is every configuration file a conffile (although most are). In Debian, conffiles are those files which are listed in the package as being a conffile. conffiles are basically a way of telling the package manager (dpkg) "If this file has been edited since it was installed, don't replace it without asking". dpkg uses md5sums to detect whether the current on-disk version of a conffile differs from the packaged file.

  • Very good answer! The only bit I miss for it being perfect would be to show a way (debconf-[sg]et-selections?) to predefine answers. Searching for this one myself.
    – PoC
    Oct 18, 2023 at 8:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .