core icon indicating copy to clipboard operation
core copied to clipboard

A plugin uninstall option to remove configs

Open dstapa opened this issue 5 months ago • 2 comments
trafficstars

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

  • [x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
  • [x] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
  • [x] When the request is meant for an existing plugin, I've added its name to the title.

Is your feature request related to a problem? Please describe. Plugin settings persist in OPNsense config.xml after removing a plugin even if not desired to be retained.

Describe the solution you'd like An option such as a checkbox on the plugin uninstall dialog to delete the plugin configs.

  • Keeps config.xml tidy
  • Allows for a clean / default settings state next time plugin is installed

Describe alternatives you've considered Manual config export, edit, and re-import is a possible workaround.

dstapa avatar Jun 06 '25 02:06 dstapa

Discussed options with @adschellevis over the years and the most useful appears to be listing all the configuration models found in the config.xml and adding a description via migration. The main trouble is that we only know which plugin has which data when installed. The config.xml is supposed to remember the settings for the bulk number of use cases. The backup page has partial imports but nobody envisioned a cleanup page for the data yet in all these years, also because it’s not a requirement that comes up often.

Cheers, Franco

fichtner avatar Jun 06 '25 06:06 fichtner

Understood r/e difficulty with mapping to config post plugin install.

A page to manage available config models would be even sweeter, as then we could maybe have a universal mechanism to reset individual things to their defaults without having to uninstall. Nice to have any solution though.

Thanks for considering!

dstapa avatar Jun 06 '25 20:06 dstapa

Thank you @AdSchellevis quite an amount of work

mimugmail avatar Oct 17 '25 04:10 mimugmail

Thank you!

dstapa avatar Oct 22 '25 01:10 dstapa