Buddhism most basic perception is avoid killing.
Assume the house is filled by termite and killing is unavoidable, assume house is too badly affected and without killing need the house to be left unoccupant for months and repair is very expensive.
This is question is meant for normal lay Buddhist and not monk.
How is Buddhism handle in this case ?
There was a Mahayana Buddhist Scholar answered is to recite Mantra to the ants that been killed as much as possible n hope ants can incarnate to a better place.