We demonstrate all-optical modulation with a near-unity contrast of nonlinear light generation in a dielectric metasurface. We study third-harmonic generation from silicon Fano-resonant metasurfaces excited by femtosecond pulses at 1480 nm wavelength. We modulate the metasurface resonance by free carrier excitation induced by absorption of an 800 nm pump pulse, leading to up to 93% suppression of third-harmonic generation. Modulation and recovery occur on (sub)picosecond time scales. According to the Drude model, the pump-induced refractive index change blue-shifts the metasurface resonance away from the generation pulse, causing a strong modulation of third-harmonic conversion efficiency. The principle holds great promise for spatiotemporal programmability of nonlinear light generation.