if you are using a wet and dry vac or carpet cleaner put a few teaspoons of wahing liquid ( the sort you put into the washing machine with your clothes) into the water tank instead of carpet cleaner.
I use this all the time and it works really well,
it is made to remove smells, food and bodily fluids from your clothes and works just as well on carpets,
it is also designed not to foam up in your washing machine, so doesn't mess up your carpet cleaner.
The best thing I ever bought is my Bissell carpet cleaner, you can usually pick them up really cheap from the Studio Catalogue.
I think that I only paid £60 for mine and it is still going strong twelve years on.