no feature yet, has to be done manually with edit.
it should be possible, maybe before purchase phase, to have also a demolition phase.
e.g. demolition - repair - purchase.
the demolition should be for structural units (or also normal units if for example they have no fuel), to leave nothing behind at a retreat.