A dirty throttle body may cause a lower than normal engine idle resulting in a stalling condition. A stalling condition may also result if an idle learn procedure is not performed if the battery goes dead or is disconnected.
Car Problem Reports
Chevrolet Cavalier Stalling or Low Engine Idle Speed Due to Dirty Throttle Body
Chevrolet Cavalier Problem
Engine Affected: 3.1L V6
Visitor, 1990 Chevrolet Cavalier, 3.1L V6, 235,000 mi
Stalling after battery replacement. I found that if you drive the car steadily at least 50 mph and turn off/on all accessories, heating, AC, lights, etc. the engine will re-learn the idle speed and correct itself. No need to do the idle lean procedure. Believe me, I've been doing this ever since I bought the car new. That was 20 years ago.