Selenium (Se), the world's oldest optoelectronic material, has been widely applied in various optoelectronic devices such as commercial X-ray flat-panel detectors and photovoltaics. However, despite the rare and widely-dispersed nature of Se element, a sustainable recycling of Se and other valuable materials from spent Se-based devices has not been developed so far. Here a sustainable strategy is reported that makes use of the significantly higher vapor pressure of volatile Se compared to other functional layers to recycle all of them from end-of-life Se-based devices through a closed-space evaporation process, utilizing Se photovoltaic devices as a case study. This strategy results in high recycling yields of ≈ 98% for Se and 100% for other functional materials including valuable gold electrodes and glass/FTO/TiO2 substrates. The refabricated photovoltaic devices based on these recycled materials achieve an efficiency of 12.33% under 1000-lux indoor illumination, comparable to devices fabricated using commercially sourced materials and surpassing the current indoor photovoltaic industry standard of amorphous silicon cells.