Yes, vinegar and baking soda are a powerful combination that has been proven to remove old stains from carpet. When combined with vinegar, the oxidizing power of baking soda creates a powerful solution that can remove the toughest stains from carpet. Sprinkle a layer of dry baking soda on the stain. Then, mix a cup of white vinegar with a cup of water and a few drops of dish soap in a spray bottle. The vinegar will foam when it comes in contact with the baking soda, which will clean the stain.
Hydrogen peroxide is another option if you have light-colored carpets because it can discolor the color if the carpet is too dark.