When writing a re-initialisation script / extension or drupal module, how would you reset CiviCRM back to clean installation state? Is it possible to install "minimal" without components and their data? Or is component data always pre-installed, enabled or not?
With component data I mean the database data that is needed for some of the build in civicrm components as listed in /civicrm/admin/setting/component. As far as I can remember, at installation I never choose components, they came pre-activated by default. When I deactivate the unnecessary components, a lot of their data is not removed from database and remains. I was wondering if there is a way to force a minimal installation without components and then programmatically activate / install the ones I need.
I was wondering if there is a way to use part of the installer code to restore the initial database, without having to reinvent the wheel.