5

When upgrading packages in Debian, often when files were edited, the package manager creates extra files as in:

/etc/default/grub.dpkg-dist  
/etc/mysql/my.cnf.dpkg-dist

More rarely, those files can create problems when upgrading production servers.

I do not feel that is a particular good solution deleting them by hand or using scripts. Is there any dpkg configuration where their creation can be forbidden?

1 Answer 1

4

No, I don't think that there is such an option for dpkg. There are several --force-conf* options that can change the behaviour of dpkg regarding configuration file conflicts. See this question and in this article.

But with any option, when there is a config file conflict, it will either

  • keep the existing version and add the new version with suffix .dpkg-dist, or
  • install the new version and keep a backup of the old version with suffix .dpkg-old

You could write a post install script to get rid of those files, but I don't think that would be a good idea. When there is a conflict, it is worth looking into what changed.

The files with .dpkg-* suffix should not cause any problems. I would assume the problems rather come from changes in the way the new package version interprets the old config file.

1
  • I have had that kind of files creeping up in modules directories where they influence the behaviour of the application. Nov 17, 2016 at 11:03

You must log in to answer this question.

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