Spray the caulk with WD-40 to loosen the caulk's hold on the carpet fibers. Allow the WD-40 to sit for 15 minutes or so.
Scrape up the caulk with a razor blade. Try to avoid cutting at the carpet fibers themselves.
Apply more WD-40 to the carpet to remoisten areas of the caulk you didn't remove. After another 15 minutes, scrape off the rest of the caulk.
Pour carpet cleaner on a sponge, and rub it into the area you just cleaned with WD-40. Remove all residue of the product because it can be dangerous to animals and young children. Work the carpet cleaner into the area, and allow it to soak for a few minutes.
Wipe the area clean with a damp cloth, and allow it to dry.