Function to delete all entities safely.
Don't trace