omni.usd.commands.prim_can_be_removed_without_destruction(usd_context_or_stage, prim_path)

Internal. A destructive remove is one that will not only edit current edit target, but also other non-anonymous layers. Why anonymous layers is not counted is because anonymous layers are writable in Kit, and it’s only existed when it’s a new stage or under session layer. Any deltas inside those anonymous layers can be safely removed. Otherwise, this function will return false, which means it will not remove prim specs in all layers, but deactivates them to avoid editing non-anonymous layers except current edit target.