Megastructure-Toggler
At the start of the game, you can choose to disable specific types of megastructures. Disabling a megastructure type will result in the technology being inaccessible and all existing megastrucutres of that type being destroyed. These megastructures are currently togglable:
Hyper Relays
Gateways
Habitats
Quantum Catapults
Ring Worlds
To configur and destroy megastructures mid game, open up the save in singleplayer and run the following console commands:
event megatoggle_event.01
event megatoggle_event.03