Destroy Prefab created using PrefabUtility.InstantiatePrefab

Hi all…
I am writing an Editor Tool which allows me to instantiate prefab into the scene do some editing then update the prefab.
I instantiate the prefab using PrefabUtility.InstantiatePrefab, and update prefab using PrefabUtility.ReplacePrefab
I can instantiate Prefab and update it fine. not a problem.
However I would like to destroy the prefab I instntiated into the scene after updating is done.
But when I use DestroyImmediate(myPrefab), an error message would show
“Destroying assets is not permitted to avoid data loss.”
I figured it could be because the prefab in scene is still connected to the parent prefab.
So I tried PrefabUtility.DisconnectPrefabInstance, and it doesn’t work . Same error would still show up.
My question is how would I go about destroying the prefab I have in the scene?

You don’t want to Destroy the Prefab, but the Instance of it - right? So

GameObject prefabInstance = PrefabUtility.InstantiatePrefab(...) as GameObject;

Destroy(prefabInstance);