Auto Deleting Families Placed by the Same Script

Dynamo package beaker has a node called “Bake elements” that does this i believe