How to remove device_tracker from database?

Not working for me the solution with “Recorder: Purge entities”.
I managed to resolve the problem like this:

  1. go to File Editor (or other editors for HA files)
  2. Search for known_devices.yaml
  3. Search in this file the entities that you want to remove and delete them.
  4. Save the file and restart HA

Maybe will help someone

I suppose this will take a little when you use the recorder. Depending on how much history you have.

Im also deleting right now. But everything is still there. But…
688076 postgres 20 0 384376 185856 160364 D 42,7 2,3 1:34.44 postgres

Created 42.7% load on the CPU.

Unfortunately I still have 20k entities. I’ve verified the file is empty and even restarted the vm HA is running on.

python script didn’t worked (broke the file), recorder service action didn’t worked (finished instantly without doing nothing), cleaning up the know_devices.yaml file didn’t worked… any other ideas?

HA ver.: 2025.1.4

1 Like

Have you checked these entries aren’t cached in your browser? They were for me.