Shout Carpet Oxy does the trick on older stains
I had some old stains from baby vomit, when my son would get into every and anything he could find. After several attempts the stains came out; it had been there for months. I had tried other well-known cleaners when the stains first appeared, but nothing seemed to work. I notice it did not ruin the carpet; it also removes juice, applesauce, and pasta sauce stains.