We present an ultrasonic device with the ability to locally remove deposited layers from a glass slide in a controlled and rapid manner. The cleaning takes place as the result of cavitating bubbles near the deposited layers and not due to acoustic streaming. The bubbles are ejected from air-filled cavities micromachined in a silicon surface, which, when vibrated ultrasonically at a frequency of 200 kHz, generate a stream of bubbles that travel to the layer deposited on an opposing glass slide. Depending on the pressure amplitude, the bubble clouds ejected from the micropits attain different shapes as a result of complex bubble interaction forces, leading to distinct shapes of the cleaned areas. We have determined the removal rates for several inorganic and organic materials and obtained an improved efficiency in cleaning when compared to conventional cleaning equipment. We also provide values of the force the bubbles are able to exert on an atomic force microscope tip.