Expanding foam fills gaps as it seals and insulates. Although it's simple to apply, removing excess foam, once it has cured and expanded, can be difficult since you will need to sand it down. Uncured expanding foam, which is still soft and moist, can be removed with a solvent. In fact, attempting to clean uncured expanding foam residue with a non-solvent solution may actually cure it rather than clean it.
Wipe away as much of the expanding foam residue as possible with a plastic putty knife and a dry soft cloth.
Moisten a second dry cloth with acetone.
Rub the acetone on the expanding foam residue lightly then apply pressure, as necessary, to rub the surface in a circular motion. Re-moisten the cloth with acetone as needed.
Wipe the acetone residue away with a soft cloth moistened with water. Remove all of the expanding foam residue before applying the water.