Regeneration of adsorbents in processes other than pressure or temperature swing adsorption by using a purge gas