The dispersal of planet-forming disks