We present the results of a study of the evolution of the gas and dust in disks around T Tauri, Herbig Ae and Vega-like stars. We observed the two lowest rotational lines of H2 with the ISO-SWS as well as 12CO 3–2 and 13CO 3–2 with the JCMT, and CO 6–5 with the CSO. The H2 lines trace the warm (∽ 100 K) inner region whereas the CO lines probe the colder outer disks. Substantial amounts of H2 have been detected toward T Tauri and Herbig Ae stars, and, surprisingly, also around three Vega-like objects (49 Cet, HD 135344 and β Pictoris). In contrast with previous conclusions derived from CO data, a significant mass of warm gas is found to persist up to ages of several tens of Myrs, suggesting that slow formation of gas-rich giant planets is possible.