White vinegar
Mix equal parts vinegar and water in a spray bottle, mist the area until damp but not wet, and let it air dry. Vinegar is a good natural deodorizer but carries its own scent, so expect a lingering smell for a while. Apple cider vinegar does the same job with a more pleasant scent.
Baking soda
Cover the dry area with baking soda, leave overnight, and vacuum it up. If the smell persists, spray the area damp with warm water, reapply baking soda, leave overnight, and vacuum again. To improve the scent, add 5-10 drops of essential oil per cup of baking soda first — use clear or natural-colored oils and spot-check the carpet. Note that some essential oils are toxic to pets, so if that’s a concern, use dried herbs or spices instead.
Borax
For extra cleaning power, mix equal parts borax and baking soda, sprinkle over the area, leave for an hour, then vacuum.
Vodka
Cheap vodka makes a good deodorizer. Spray a little onto the carpet, leave 10-15 minutes, blot up the moisture with paper towels, then air dry (or sprinkle baking soda on top, leave an hour, and vacuum).
DIY vomit cleaners
If you don’t have commercial carpet cleaner on hand, you can make a great DIY carpet cleaner from common household items.
Club soda
Club soda is easy to use — it’s just water with carbon dioxide and dissolved salts, so it’s safe on anything water-safe. Remove as much vomit as possible, dampen the stain with club soda, and blot it out with a clean cloth or paper towel.
Hydrogen peroxide
Make a 50/50 mix of hydrogen peroxide and water with a couple of drops of dish soap. Remove as much vomit as possible, apply until the carpet is damp, let it sit half an hour, then gently lather with a clean cloth (taking care not to spread the stain). Blot up the excess and clean again with fresh water to remove soap residue.
Vinegar and detergent
For tougher stains, mix 2 cups water, ½ cup white vinegar, 1 tablespoon salt, 1 tablespoon dish soap or laundry detergent, and 2 tablespoons rubbing alcohol. Apply with a spray bottle or sponge until damp but not wet, leave 10 minutes, blot dry, then rinse with clean water.