Goo-Gone (or alcohol, lighter fluid, or a mild solvent for adhesives)
Slotted screwdriver (or a small chisel, or a chamfered stick)
The thing is, with cameras made in the last 30 years or so, the foam used was usually self-adhesive using double-sided tape.
So the easy way to remove the foam remnants is to apply some solvent to the tape, and remove the tape backing. After that is done, it’s far easier to clean up the little fragments of foam floating around.
Try to start removing the tape from the edge, so that it comes off in one long strip. You can use the screwdriver (you must be careful not to slip and scratch the body, maybe a chamfered stick of bamboo will be safer) to ease it away after the solvent has softened the adhesive.