TLDR- Is there another/better way to purge communities from the database besides doing it one at a time from the webui?

I tried getting a list of communities with curl by adding subscribers_local=0 to the string since that’s how they show up in the DB but it doesn’t seem to be recognized at all, and the request returns all communities that meet the other criteria. That pretty much kills purging via API since I would have to do it one at a time and manually compile the list…Is there a better/faster/less manual way to somehow purge communities based on that criteria besides finding them from the webui and purging them one at a time? This is for hundreds of communities so any level of automation would help.