When your car's O2 sensor begins to show fault codes or fails emission testing, you should replace it. Some experts advise changing your sensor whenever your car is tuned up, regardless of its present status. Preventive maintenance usually involves examining and changing the O2 sensor.