Invisible orphaned entities

Hi there,

I’m trying to build my custom integration, in the early versions I created many entities with very basic ids. Now, when job is almost done, I want to make ids for entities more readable, but what ever I do HA is assigning ids created at first run, even when integration is removed (no orphaned entities in Settings->Devices and services->Entities) and added again after HA restart.
Interesting thing is, when I add some prefix in _attr_unique_id the entities are created with new ids but prefixed, and that works only once, probably HA is remembering them somewhere and reuses when I try to create entities again.
Where these ids are stored so I can remove them?

many thanks for any tip

Fixed, for others facing similar situation:
entities, even when removed from UI, are stored in core.entity_registry and core.device_registry files. If you edited them in UI they wil be also in core.cinfig_entries. My fault was I was deleting them when HA was running, during next HA stop all the entries get restored from memory. So, you need to stop HA first, clear the files next and restart HA.