Removing foaming from borewell water

We add surfactant in borewater but when the water is extracted from the borewell the foaming due to surfactant does not dissolve in water. My question is that how to remove that foaming present in water due to surfactant?