swap one material with another is there a way to swap a material with another?

let`s say I have materials yellow, and gold, what I want is, to replace the material yellow, with the material gold, so all the objects that have the material yellow on it, to have the material gold instead.

In other words, material yellow to become material gold, and delete material yellow.
Go to the Outliner. At the top click the button and switch to Blender File. Still in the Outliner choose Materials, twirl it open with the little triangle to the left. You will now see all the materials in the file in a list. Now you just need to select the offending materials, right click it, choose Remap Users. And from the list choose the correct material. Now they will all link to the same correct material.