How to remove 55K bad remote Home Assistant entities?

So I did a dumb thing…

I was configuring Remote Home Assistant…I added the token for the remote on the main…Then I went and did the same thing on the remote…

Then I noticed the CPU load on each instance go to 100 as it sat and kept re-importing the devices from each other, creating a massive entity loop.

Before I could stop it, there were over 55,000 entities created in loops between the two instances.

Now, how do I delete them? I tried deleting them, but it says I can’t because the integration has to stop providing them first. So I disabled the integration, still won’t go away, tried rebooting/deleting, still won’t let me delete. I deleted the integration, rebooted, still won’t let me delete.

I went to devtools and tried to purge the entities there, but they don’t show up there, and they also won’t delete by integration.

So now I’m stuck with 55,000 useless entities that HA won’t delete.

How do I get rid of them?

Looks like someone vibe coded something if you want to trust it.

Otherwise in the UI do some filtering and delete them in the UI. There is a multiple select.

Looks like something I would expect Spook from @frenck to include, and is probably getting a lot of love in relation to the recent 2026.9 core update issues.

Please don’t tag people like that. https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#p-578066-onesix-should-i-tag-people-22

Sorry, should have raised a change request for Spook.