The present invention relates to a method for sealing a package cavity. A first ring of first bonding material is deposited onto the surface of a first component. The first ring has a predetermined shape outlining a circumference of the cavity and a predetermined thickness. A second ring of second bonding material is deposited onto the surface of a second component. The second ring has a predetermined shape corresponding to the shape of the first ring and a predetermined thickness. The second ring further comprises a predetermined raised pattern such that an exchange of gaseous material between an atmosphere inside the cavity and an atmosphere outside the cavity is enabled prior to reflow of the second bonding material. A gaseous desoxydizing material is provided during temporary bonding of the first and the second ring. The gaseous desoxydizing material is then substantially removed inside and outside the cavity prior to reflowing of the second bonding material for bonding with the first bonding material.