The invention provides vacuum swing adsorption processes that produce an essentially carbon monoxide-free hydrogen or helium gas stream from, respectively, a high-purity (e.g., pipeline grade) hydrogen or helium gas stream using one or two adsorber beds. By using physical adsorbents with high heats of nitrogen adsorption, intermediate heats of carbon monoxide adsorption, and low heats of hydrogen and helium adsorption, and by using vacuum purging and high feed stream pressures (e.g., pressures of as high as around 1,000 bar), pipeline grade hydrogen or helium can purified to produce essentially carbon monoxide -free hydrogen and helium, or carbon monoxide, nitrogen, and methane-free hydrogen and helium.