Use a vacuum cleaner over the carpet to remove surface dust and dirt. Fill half a bucket with warm water, 1 cup of ammonia and mix it. Dampen a sponge in the mixture and wipe over the stains. Start from the edges and then move towards the centre. Use a dryer over the carpet and let it dry for some time.
Using a vacuum cleaner, get rid of all the surface dirt. Fill a small container with ½ cup of white vinegar, add 2 tablespoons of salt and stir it. Dampen a sponge in the mixture and gently rub over the stains. Let it dry for a while. Finally, use a vacuum cleaner to suck the residues of salt.
Get rid of surface dirt with a vacuum cleaner. Sprinkle some water on the stains. Take a sponge and rub it over the stains. Squirt some shaving cream on it and then wipe it with a damp sponge. Let it dry.