API created services remain after deleting host


Currently we have a setup where 1 service will monitor all disks on a system via snmp. and create a service for each disk on the host via the api and also send in the results.
This works fine until we remove the host config. At that point the host will be gone but all the services created via the api are still defined and will break the config validation.

Is there a way to automatic clean up the api services? Or should i script around it?