How to Clear Codes After a Repair — And Why It Matters
By ScanFixAI Team • June 18, 2026 • 9 min read
You just replaced that oxygen sensor, swapped the coil pack, or fixed the vacuum leak. The repair is done, but the check engine light is still on. Do you need to clear the codes? Will they clear on their own? And what about that emissions test next month?
Clearing diagnostic trouble codes (DTCs) after a repair is a simple but important step that many DIY mechanics skip or do incorrectly. This guide explains exactly when to clear codes, when not to clear them, how readiness monitors work, and how ScanFixAI handles it all for free.
Why Clear Codes After a Repair?
1. Turn Off the Check Engine Light
The most obvious reason. When the ECU detects a fault, it stores a DTC and illuminates the MIL (Malfunction Indicator Lamp — your check engine light). Fixing the underlying problem does not automatically turn off the light. The ECU needs to either:
- Run the relevant diagnostic monitor and confirm the problem is gone (this can take several drive cycles — days to weeks)
- Have the codes cleared manually with a scan tool
Clearing the codes resets the MIL immediately, confirming your repair worked (as long as the light does not come back).
2. Verify the Repair Was Successful
Clearing codes after a repair creates a clean baseline. If the check engine light returns within a few drive cycles, you know the repair did not fully address the issue — or there is an additional problem. Without clearing, you cannot distinguish between an old stored code and an active recurring fault.
3. Reset Fuel Trim Adaptations
When you clear codes, the ECU also resets short-term and long-term fuel trims to zero. This forces the engine to relearn its fuel delivery from scratch with the new component. For repairs like oxygen sensor replacement, MAF sensor replacement, or intake leak fixes, resetting fuel trims helps the engine adapt to the corrected condition faster.
How to Clear Codes with ScanFixAI
Clearing codes is a free feature in ScanFixAI — no Pro subscription required. Here is how:
- Connect your Bluetooth OBD-II adapter to the car's OBD-II port (under the dashboard, driver's side)
- Open ScanFixAI and let it connect to the vehicle
- Tap Scan to read all current codes
- Review the codes — make sure they match the repair you performed
- Tap Clear Codes
- ScanFixAI sends the clear command to the ECU and confirms success
- The check engine light turns off
Pro Tip: Before clearing, screenshot or save the code list from ScanFixAI. This preserves a record of what was found, which is useful if the codes return or if you need to reference the history later.
Understanding Readiness Monitors
This is where code clearing gets important for emissions testing. Every OBD-II vehicle has a set of readiness monitors — self-tests that the ECU runs to verify emissions systems are functioning. There are typically 8–11 monitors depending on the vehicle:
- Catalyst (CAT) — Tests catalytic converter efficiency
- EVAP — Tests the evaporative emissions system for leaks (see our Toyota EVAP guide)
- Oxygen Sensor — Tests O2 sensor response
- Oxygen Sensor Heater — Tests O2 sensor heater circuit
- EGR — Tests exhaust gas recirculation system
- Misfire — Monitors for engine misfires
- Fuel System — Tests fuel delivery and trim adaptation
- Comprehensive Component — Tests various sensor inputs
- Secondary Air — Tests secondary air injection (if equipped)
The Clearing and Readiness Problem
When you clear codes, all readiness monitors reset to "Not Ready" (Incomplete). This is important because:
- Most states require all or most monitors to show "Ready" (Complete) to pass an emissions test
- Monitors take time and specific driving conditions to complete — typically 50–200 miles of varied driving over several days
- If you clear codes right before an emissions test, the car will fail for "monitors not ready" even though the repair fixed the problem
Emissions Testing Tip: If your emissions test is coming up, clear codes immediately after the repair, then drive at least 100–200 miles with a mix of city and highway driving before going to the testing station. Use ScanFixAI to check readiness monitor status — all monitors should show "Complete" before testing.
Drive Cycle for Readiness Monitors
Each manufacturer has a specific drive cycle to complete all monitors. A general drive cycle that works for most vehicles:
- Cold start (engine off for 6+ hours, coolant below 122°F)
- Idle for 2–3 minutes (completes O2 heater monitor)
- Accelerate to 45 mph at moderate throttle (completes misfire, fuel, comprehensive monitors)
- Hold steady at 45–55 mph for 5 minutes (completes catalyst and O2 sensor monitors)
- Decelerate to 20 mph without braking (coast down — helps complete EGR monitor)
- Accelerate back to 55 mph and hold for 5 minutes
- Stop and idle for 2 minutes (helps complete EVAP monitor)
The EVAP monitor is typically the last to complete because it requires specific conditions (fuel level between 1/4 and 3/4, specific temperature range, extended idle after driving).
When NOT to Clear Codes
1. Before Diagnosing the Problem
Clearing codes before you understand the problem erases valuable diagnostic information. The freeze frame data (engine conditions when the code set) and code history are lost when you clear. Always read and record codes and freeze frames before clearing.
2. To Hide Problems Before Selling a Car
Clearing codes to hide known issues before selling a vehicle is unethical and potentially illegal in many states. A savvy buyer with a scan tool will see "monitors not ready" and know the codes were recently cleared. ScanFixAI shows readiness monitor status, making this easy to detect.
3. When Buying a Used Car
If you are inspecting a used car and ScanFixAI shows all monitors "Not Ready," the seller likely cleared codes recently. Ask why. Request to drive the car for a full drive cycle and re-scan, or walk away.
4. Before Understanding the Full Picture
Some vehicles store multiple related codes. Clearing them one at a time without understanding the relationship can lead to a wild goose chase. For example, a P0171 (lean bank 1) might be accompanied by a P0174 (lean bank 2) — clearing one without reading both means you miss that the problem is systemic (like a vacuum leak) rather than bank-specific.
What About Disconnecting the Battery?
Disconnecting the battery for 15–30 minutes is the old-school method of clearing codes. It works, but it also:
- Resets all radio presets and clock
- Erases all adaptive learning (idle, fuel trims, transmission shift points)
- May trigger anti-theft systems that require a radio code or dealer reset
- Resets power window and sunroof initialization (requires relearn procedure)
- Does NOT always clear codes on modern vehicles — some ECUs have non-volatile memory that retains codes through power loss
Using a scan tool like ScanFixAI is better in every way: it clears only the codes and fuel trims, preserves radio presets and adaptive learning, and confirms the clear was successful.
ScanFixAI's Code Clearing Advantage
- Free code reading and clearing — No subscription needed for basic scan and clear
- Freeze frame capture — ScanFixAI saves the freeze frame data before clearing so you have a permanent record
- Readiness monitor display — Check which monitors are complete/incomplete before going for emissions testing
- Code history — ScanFixAI keeps a log of all codes found on your vehicle across sessions, building a diagnostic history
- AI post-repair verification — After clearing, ScanFixAI's AI (Pro feature) monitors your next drive to verify the repair was effective
After Clearing: What to Watch For
- Check engine light returns within 1–3 drive cycles — The repair did not fully fix the issue, or there is an additional problem
- Different code appears — The original repair may have been correct, but there is a second issue now visible
- Light stays off but driveability is still poor — Some issues do not set codes immediately. Use ScanFixAI's Test Drive Mode to monitor live data
- Light stays off and car runs well — Repair confirmed successful. Drive the full readiness cycle if you need emissions testing.
Clear Your Codes for Free
ScanFixAI reads and clears DTCs on any OBD-II vehicle for free. Check readiness monitors, save freeze frames, and verify your repairs worked.
Download ScanFixAI Free