A method for cleaning a semiconductor substrate (1,13) comprising on a surface of the substrate: • at least one structure, said structure comprising a first conducting or semiconducting material, • a layer of a second conducting or semiconducting material, said first and second material being in physical contact, and having a mutually different electrochemical potential, said layer extending over the totality of said surface, said at least one structure being present on top of said layer, or said layer being adjacent to said at least one structure, the method comprising the steps of: - providing said substrate, - positioning a counterelectrode (20,30) facing said substrate surface, - supplying an electrolytic fluid to the space between said surface and the electrode, said counterelectrode acting as an anode in the galvanic cell defined by the substrate surface, the cleaning fluid and the counterelectrode (20,30), and wherein the operation as anode is achieved through the electrochemical potential difference between the counterelectrode (20,30) and the layer of the second conducting or semiconducting material, and wherein the method further comprises the step of applying a voltage difference between the layer of a second conducting or semiconducting material and the counterelectrode, said voltage difference being applied so that the counterelectrode operates as an anode. • at least one structure, said structure comprising a first conducting or semiconducting material, • a layer of a second conducting or semiconducting material, said first and second material being in physical contact, and having a mutually different electrochemical potential, said layer extending over the totality of said surface, said at least one structure being present on top of said layer, or said layer being adjacent to said at least one structure, the method comprising the steps of: - providing said substrate, - positioning a counterelectrode (20,30) facing said substrate surface, - supplying an electrolytic fluid to the space between said surface and the electrode, said counterelectrode acting as an anode in the galvanic cell defined by the substrate surface, the cleaning fluid and the counterelectrode (20,30), and wherein the operation as anode is achieved through the electrochemical potential difference between the counterelectrode (20,30) and the layer of the second conducting or semiconducting material, and wherein the method further comprises the step of applying a voltage difference between the layer of a second conducting or semiconducting material and the counterelectrode, said voltage difference being applied so that the counterelectrode operates as an anode. - providing said substrate, - positioning a counterelectrode (20,30) facing said substrate surface, - supplying an electrolytic fluid to the space between said surface and the electrode, said counterelectrode acting as an anode in the galvanic cell defined by the substrate surface, the cleaning fluid and the counterelectrode (20,30), and wherein the operation as anode is achieved through the electrochemical potential difference between the counterelectrode (20,30) and the layer of the second conducting or semiconducting material, and wherein the method further comprises the step of applying a voltage difference between the layer of a second conducting or semiconducting material and the counterelectrode, said voltage difference being applied so that the counterelectrode operates as an anode.