Removing packages retains old configuration and might "fool" luci

Dear all,

I played around LEDE and found hard to install/remove packages, as the old configuration is retained in /etc/config. As a result, luci is easily broken. Examples:

  • remove dnsmaq (if you don't need a dhcp server and only need a dhcp client).
  • launch luci.
  • Luci section Network=>dhcp server is still present. You might click and configure and nothing happens.

The same applies for other packages, which drove me "mad" before understanding:

  • luci-app-unbound
  • luci-app-adblock

Furthermore, when reinstalling dnsmasq, the old configuration is retained and the new (pristine) configuration is discarded. On other systems, when a new package is reinstalled, the configuration file "foo" is saved as "foo.bak" like in Gnu/linux Debian.

So I got confused until I understood that I had to look for file in /etc/config and remove them carefully.

Keep the good things!