How clean up database from old and excluded from recorder sensors?

Here is part of my config:

recorder:
  exclude:
    domains:
      - automation
    entities:
      - camera.porch_camera
      - camera.bedroom_tv_image
      - sensor.bedroom_tv_challenge
      - sensor.bedroom_tv_info_url
      - input_text.bedroom_tv_message
      - sensor.kicker_team

But automations still in History panel:

Also I’m having some devices which created by device_tracker.ddwrt but now it’s removed from known_devices.yaml and they still also in history.

Running recorder.purge service with {"keep_days": 0} data and restart also without any changes.

I f you don’t care about the history - and it seems like you don’t - deleting the database file (home-assistant_v2.db) normally works for me.

At now yes. But I want understant what should doing in future. So maybe any other solution?

It seems, the entities shown by history do not relate to data in the database/recorder.
I had to specify the entities I want to see in history configuration explicitly.

Looks like bug? If we don’t record state for excluded from recorder sensor what we see in history?