Change to only do the main delete if not using python scripts.