The invention relates to a method and to a system intended for drilling and cleaning operations in underground working wells or for bringing in operations in the case of a reservoir. In the method, circulation between the ground surface and the well bottom and return to the surface are performed from a string of pipes lowered into the well. The foam is generally injected through the inside of the pipes and it returns through the annular space defined by the pipes and the walls of the well. The fluid in the form of foam carries the cuttings along to the surface, thus cleaning the wall face. This technique, referred to as foam drilling, is well-known and has notably the advantage of not generating too high a bottomhole pressure thanks to the low density of the foam. However, the main drawback of this technique is that it does not allow ready recycling of the foaming solution, in view of the products initially brought into solution to stabilize the foam after stirring and gas injection. &lt;&lt;Breaking &gt;&gt; of the foam is the basic problem if one wishes to recover most of the foaming products for repeated use, or if the environment conditions do not allow spreading of the volume of foam returning from the well.
Document WO-94/17,154 proposes using an amphoteric foaming agent combined with surfactants as the base for a stable foaming composition. The foam is broken by a suitable variation of the pH value of the foam. If the foam is basic, it is broken by decreasing the pH value at least below 4, and if the foam is acid, it is broken by raising the pH value at least above 9.5.