Generally, you might need to prevent some oxidation reactions during the electrodeposition, then purging with some inert gas (typically, nitrogen gas). Oxygen can be excluded during the process of the electrodeposition by this purging. But this is completely depends on the syestem you are using (bath composition and the deposit you are seeking). Please, show a bit more details so I can give further detailed answer.