firstboot would invoke a factory reset, for both user-installed packages and (all) configuration.
While there are some more surgical, manual approaches, exploiting the technical details of how overlayfs works, that would be a pretty hands-on approach, with rather close ties into syntax compatibility of the configfiles involved.