debian mentors/ glossary/ conffile


A conffile is a configuration file that is registered with dpkg for some special treatment by it. dpkg handles these files differently on upgrades and other operations, for instance not automatically replacing the file with the new version if it was changed by the adminstrator.

All files in /etc should be marked as conffiles, and a few others as well. Doing so means that you can't be blamed if the administrator loses some of their local changes.

A conffile should never be automatically modified in a ?maintainerscript.

To mark a file as a conffile it should be listed in DEBIAN/conffiles in the BinaryPackage. This can be done automatically in the general case by ?debhelper.

If you have a file that requires this treatment, but can't be marked as a conffile (perhaps because it is created on the first install), you can use ?ucf to get the same behaviour.