Force only configuartion.yaml

I want my configuration.yaml to dictate all my configuration

I do not use auto-discovery and have standardized on mqtt.
whenever I rename, delete or edit a device in the configuration.yaml the old entry remains in the UI as “unavailable”. I know I can delete each old entry in the UI but this is not scalable.

How do I force home assistant to ignore anything but what I have configured within my YAML file.
Is there a config file or database I can flush at startup ?

Check out the contents of the config/.storage folder

Particularly,

core.device_registry
core.entity_registry

They are text files containing json formatted configuration.

Make a backup of this folder before deleting anything.

exactly what I was looking for.

However it seems I need to change my thinking. The push to use the UI and the move away from YAML is great for a limited number of devices but not so scalable. From the developer docs it seems json is the way forward and another learning curve for me.

thanks for your help