Hi Mishua,
Thank you for asking this question on the Microsoft Q&A Platform.
I came across this script and will be using it my lab however it does the job as per the Github repo, so please review this and try out.
DataSyncMetadataCleanup
If it does not map your requirements, I will suggest you can raise a support ticket with Microsoft.
==
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.
Hi,
I think you can backup the configuration and export to csv, deleting the connector is the option I can think of
The option Delete connector space only removes all data, but keep the configuration.
The option Delete Connector and connector space removes the data, the configuration and all the sync rules associated with the connector. This option is used when you do not want to connect to a forest anymore.
However you will need to reconfigure the connectors and import the data. Best way or approach will be carry this in Dev Test Env.
==
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.