So I've stumbled upon issue after issue every time I upgrade using apk upgrade that apk keeps on adding default config files without my consent, is there any way to have apk either never override/replace the config file or have it prompt the user the way apt on debian-based distro does?

  • Could you please share an example for such package(s), which config files were overridden? I'm not familiar with such apk option, but could also be related package specific install scripts (i.e. package bug)
    – valiano
    Jun 14, 2019 at 6:39
  • Hi sorry, for late reply. The packages that has done that is nginx, php-fpm and rutorrent. rutorrent will just override any config.php you have with the latest one nginx will create it's own default folder and insert it's default (hello world conf) conf into it. php-fpm will override the php.ini and php-fpm.conf
    – Kappa
    Jul 1, 2019 at 13:08

1 Answer 1


If the [installation] is diskless mode (as I suppose), you can add the files you want to keep to lbu, with the command lbu include /etc/nginx/nginx.conf, for example.

In this way, when the OS restarts and reinstalls all the package with the default config files, at the end the overlay is untarred and you will get back the saved files.

.: Francesco

  • Thanks for the comment! Well Alpine Linux is being run in a lxd container, so it's only when I decide to update it that it overrides my personal configurations
    – Kappa
    Jul 21, 2019 at 15:14
  • You update with "apk update && apk upgrade" ? If so, default behavior of apk is not overwrite the config files, rather it creates an .apk-new containing the default config file shipped with the package. Aug 20, 2019 at 15:32

You must log in to answer this question.

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