Batch-delete multiple unused devices (GAEN, iBACON, MS-CDP)

After some experiments with the now ditched ble_OpenMQTTgateway, I endet up with thousands of “iBeacon”, “GEAN” and “MS-CDP” devices (4634 devices with 17966 entities in MQTT integration), wich clog my user interface and sure take some ram somewhere.
Is there any way of getting rid of those devices. Manually deleting those from .storage does not seem to be a feasible option and i found no freeware for yaml batch-deleting.
interesting enough, home assistant still runs rather smoothly in a complex setting with zigbee and bluetooth-via-mqtt-devices, so I do not want to restart my setup.

I solved this problem by deleting any MQTT-related devices in .storage/core.device_registry and .storage/core.entity_registry after identifying them by their common config_entry.
Did this by a small python-script - leave my a line if you run into the same problem, I’ll help you out.

1 Like

Hi, I have the same problem, can you help me with your python-script to remove those ghost entities? Thank you so much!

I have the same with smoke detectors through RFXcom (probably from neigbours).
Could you help me get rid of them (500+ devices)

Sorry, I never got notified of replies here (Spam…) - i loaded the scripts up here - they have to modified for your entity-ids of course

I have the same problem, but the github links are dead.
Anyone having a backup of those scripts?