If you've got access to a steam and carpet cleaner don't waste your time pulling the carpet. Just use those with a close to ph neutral cleaner. Citrsolv if you can get it from a local janitorial supply, Avenge is a great spot cleaner as well if you can get it. Pre-spray it, let it sit, then extract with just hot water through the carpet cleaner. Avenge, simple green, or just regular old Dawn dish soap for stubborn spots. Drill brush with those cleaners if the spots are really stubborn. Don't go nuts with the cleaners either. More doesn't mean mean effective, it just means you're going to spend more time getting it out of the carpet.
Pre-spray and extract with water only with whatever you end up using. Stay away from Resolv, Oxy-clean, ect. Don't buy carpet cleaners from places like Lowe's, HD, ect. Most of shit sold in retail stores is intentionally high alkaline and the store bought carpet cleaners want you to add that crap to the tanks because you're leaving it behind in the carpet so it continues to attract more dirt and gets dirty faster so you keep buying it.
Did carpet/floor cleaning professionally for a while years ago. Most if the industry is a borderline scam outside of places that do two stage hot water extraction or actual carpet places that are setup for flood washing.