There are few odours as repulsive as the smell of vomit. On hard floor surfaces, cleaning is easily done with a damp mop. On carpet, though, vomit clings to the fibres and takes a bit more work to remove. However, if you start cleaning it up as quickly as possible, you'll have the odour gone in little time. Even if a bit of time has passed, and the vomit has dried on, you can still get the odour out without hiring professional carpet cleaners.
Put on protective gloves. Whether the vomit was caused by an illness or something else, you don't want it on your hands. Use paper towels to remove solid debris, whether it is dry or still wet. Get as much of it up as you can this way.
Test the carpet cleaner in a discrete area of carpeting to make sure there is no discolouration. Spray foaming carpet cleaner over the area.
Work the carpet cleaner into the carpet fibres with a damp sponge and allow it to sit on the carpet. Check the cleaner's label for the exact amount of time you should leave it on. This is usually about 15 minutes, or until it dries.
Vacuum up the cleaner. Some of the odour should be removed now. Next, liberally apply dry baking soda to the area. You should completely cover the area vomited upon with a thin layer of the baking soda. Next, use a damp sponge to rub it into the carpeting. Then sprinkle more baking soda on top. Let this sit overnight.
Remove all of the baking soda with the vacuum cleaner. The smell should now be neutralised. If any odour remains, reapply dry baking soda to the area and leave on again overnight.
Make sure you are using baking soda and not baking powder. Baking powder won't do much good. For best results, get the vomit out of the carpet as quickly as possible. This helps prevent the odour from settling in.
Vomit can easily stain carpeting, especially if the contents include wine, tomato sauce, or other matter that typically stains.