How to Clear OBD2 Codes (and When Not To)

A handheld OBD2 scanner showing the erase codes option inside a car cabin in a workshop.

Clearing an OBD2 code takes about two seconds. The effects last days. The check engine light goes off, but that is not all that changes: you also lose the freeze frame data stored with the fault, and every readiness monitor on the vehicle resets to incomplete. This guide covers what actually gets deleted, the correct order of operations, when clearing is the right call, when it makes things worse, and what to know about the battery disconnect method.

Kamil Siegień, founder and writer of OBD2 Scout

About the author: Hello! I’m Kamil Siegień, founder of OBD2 Scout. My diagnostic experience started with an engine rebuild on a 2014 Skoda Superb 1.8 TSI, where tuning from 160 to 222 hp required mastering live data and ECU behavior that basic code readers cannot handle. I am a former BMW and MINI employee and regularly use diagnostic scanners on my own Audi A4 2.0 TFSI.

The most common mistake drivers make is treating code clearing as a fix. Clearing the code removes the record. It does not change the condition that created the record.

What Actually Gets Deleted When You Clear Codes

Clearing codes through a scanner or by disconnecting the battery removes three things from the ECU’s memory at once. Stored fault codes (active and pending) are erased. Freeze frame data attached to each code is gone: that snapshot of engine conditions at the moment the fault triggered is not recoverable once cleared. Every readiness monitor resets from complete to not ready. My guide on what each OBD2 monitor tests covers the enabling conditions for each type, how to read the status screen, and why non-continuous monitors take much longer to complete after a reset than continuous ones.

The readiness monitor reset is the consequence most people do not anticipate. Readiness monitors are the ECU’s self-checks for each emissions-related system. When they show complete, the system ran its test and passed. Clearing codes sends all of them back to the starting state regardless of whether the underlying systems are working correctly. My guide on the OBD2 system and what the ECU is tracking covers which systems are mandatory under the OBD2 spec, how the standardized monitoring framework was designed, and how that framework connects to the readiness monitor pass/fail structure.

Some vehicles also reset adaptive learned values when codes are cleared: short-term fuel trim baselines, throttle body learned position, and idle control values. This varies by make and model and is more common with the battery disconnect method than with a scanner clear. My guide on how to scan and clear codes with an OBD2 scanner covers the scanner-based clear method in detail, how to confirm the clear was successful, and what to check before and after to avoid missing important pending codes.

What does not get cleared: permanent codes. The ECU ignores a clear command for any permanent code until the fault is repaired and the corresponding readiness monitor passes under real driving conditions. A permanent code cannot be erased with a scanner or a battery disconnect.

The Correct Sequence: Read, Record, Repair, Then Clear

Clearing codes is the last step in the repair process, not the first response to a check engine light. The correct sequence is: scan and read all codes, record every code and its status (active or pending), photograph the freeze frame data on every active code, diagnose and repair the fault, then clear to verify the fix. My guide on how each OBD2 code category is structured covers what the letter prefix tells you about which system triggered the fault, how the four-digit number narrows it to a specific circuit, and why a manufacturer-specific code requires a make-specific lookup rather than a standard database.

The reason order matters: freeze frame data is the only record of what the engine was doing when the fault triggered. Once you clear, that record is gone. If the repair does not hold and the code returns, you start the diagnostic process with less information than you had before clearing. My guide to what OBD2 freeze frame data captures covers exactly which parameters are in that snapshot, how to establish the operating scenario from the stored values, and which freeze frame fields are most diagnostic for the common fault types.

After clearing, drive through at least one complete drive cycle before concluding the repair worked. A complete drive cycle includes a cold start, city driving, and a highway run at sustained speed. Some codes need two or three cycles to confirm whether the fault is genuinely resolved.

Four Times Clearing Is the Right Move

A mechanic using an OBD2 scanner beside an open engine bay after a completed repair to confirm that cleared codes do not return.

After a confirmed, completed repair. Clear the codes once the fault is fixed, then drive normally and re-scan after a full cycle to confirm the code does not return. This is the primary legitimate use of the clear function. My guide on reading live OBD2 parameters covers which sensor values confirm a repair held — fuel trims, O2 sensor switching, and coolant temperature — so you have objective data before booking a retest or selling the vehicle.

After a single-occurrence pending code that never became active. If a pending code appeared once and has not returned over several days of normal driving, the fault was likely intermittent and resolved itself. Clearing the pending code is reasonable at this point. My guide on the OBD2 pending and confirmed code lifecycle covers why a pending code can disappear on its own, what the ECU must observe on the next qualifying drive for that to happen, and when a single-occurrence pending code is still worth investigating.

After a battery replacement or disconnect triggered system codes. U-codes and certain network codes appear routinely after a power loss. These are not real faults. They are the ECU logging the fact that it lost power temporarily. Clearing them after a battery replacement is normal and expected. My comprehensive guide on the OBD2 code system covers the full range from U-codes and network communication faults to powertrain and body DTCs, including what each category tells you and when a specific code type is routine rather than a diagnostic concern.

When deliberately monitoring an intermittent fault. Clear the codes and drive normally to collect a clean scan the next time the fault appears. This gives you a fresh record of the conditions without previous codes cluttering the readout.

Four Times You Should Not Clear

Before you have read and recorded everything. Clearing before documenting removes the only evidence of what the ECU detected. If the fault is intermittent, that code may not appear again for days or weeks. Record first, always.

Before an emissions inspection. Clearing resets readiness monitors and causes a test failure even when no codes are present. This is covered in detail below.

When the check engine light is flashing. A flashing light indicates an active misfire severe enough to damage the catalytic converter. Stop driving. Do not clear anything. The priority is to stop the damage, not to silence the light.

When you do not know what the code means. Clearing an unfamiliar code without understanding it removes the only record that the fault occurred. If the vehicle is symptomatic, you need that record to diagnose the cause. Look up the code first.

The Battery Disconnect Method

A mechanic disconnecting a car battery in a repair workshop with an OBD2 scanner nearby, illustrating a full ECU reset.

Disconnecting the battery cuts power to the ECU, which clears stored codes and resets readiness monitors. It works, but it resets more than a scanner clear does. When power is removed, the ECU loses short-term fuel trim baselines, throttle body learned position, idle control learned values, and on some vehicles, transmission shift points and power window auto-calibration.

After reconnecting the battery, expect slightly rough idling and hesitant gear changes for the first 50 to 100 miles while the ECU relearns its normal operating parameters. This is not a fault. It is the ECU collecting new data to replace what was erased.

A scanner clear is the better method for most situations. It removes the codes and resets the monitors without touching the adaptive learned data the ECU uses to optimize everyday performance. The battery disconnect is useful when you want a complete ECU reset, such as after a major repair involving multiple systems.

The 60 to 90 second cable-touching step described in some guides (touching the positive and negative cables together after disconnecting) drains the capacitors in the ECU. This empties short-term memory more thoroughly than a simple disconnect. It does not change which categories of data are cleared or preserved.

Clearing Codes Before an Emissions Inspection

An emissions inspection checks two things: no active fault codes and all required readiness monitors showing complete. Clearing codes before the inspection satisfies neither condition once the monitors reset. My guide to the OBD2 pre-inspection scanner check covers what the inspector’s machine reads from the port, the correct order of steps before booking, and what to do when a monitor is still showing incomplete.

The check engine light goes off when codes are cleared, but the monitors go with it. A vehicle with no codes and incomplete monitors fails the inspection in most US states. The test result will show something like “monitors not ready” or “I/M readiness incomplete.” The light being off provides no advantage. My guide on what an OBD2 scanner cannot detect covers the specific emission-related conditions that return a clean code scan but still cause a test failure, and why monitor status is a more reliable pre-inspection check than the absence of active codes.

Plan for at least 3 to 5 days of varied, real-world driving after clearing before attempting an inspection. This should include cold starts, city driving at varied speeds, and at least one sustained highway run. The EVAP monitor and catalyst efficiency monitor in particular require specific conditions to complete and are often the last to set. My guide to the OBD2 drive cycle sequence covers the exact enabling conditions for each monitor, the standard phase-by-phase procedure, and why the catalyst and EVAP monitors consistently take the longest to complete.

If your check engine light was on before the inspection, clearing it the night before is not a strategy. The vehicle will fail for incomplete monitors. The only path to passing is to repair the fault that triggered the light, clear the codes after the repair, and drive until all monitors complete.

The Used Car Red Flag

A man checking an OBD2 scanner inside a used car and seeing multiple readiness monitors not ready at the same time.

A scan of a used car showing all readiness monitors as not ready simultaneously is a strong sign that codes were cleared recently. Under normal driving conditions, different monitors complete at different times based on driving patterns and conditions. Seeing all of them incomplete at once is not the natural state of a vehicle that has been driven regularly.

Pre-sale code clearing is a known practice: the seller clears the codes to turn off the check engine light, making the car appear problem-free. The codes are gone and the light is off, but the monitors have not had time to run and confirm whether faults return.

If you see this pattern on a pre-purchase scan, ask the seller to drive the car for 3 to 5 days of normal use and bring it back for a re-scan. If the seller declines or the monitors remain incomplete on the follow-up scan, treat it as a sign that faults may be present and were hidden before the showing. My step-by-step guide to checking a used car with an OBD2 scanner covers the full four-phase inspection process, including how to interpret the monitor status and what to do if the seller refuses a rescan.

FAQs

Does clearing OBD2 codes fix the problem?

No. Clearing codes removes the record of the fault from the ECU’s memory. It does not repair the component that triggered the code or change the condition that caused the ECU to log it. The fault remains, and the code will return the next time the ECU runs the relevant monitor and detects the same abnormal condition.

How long after clearing codes can I take my car for an emissions test?

Plan for at least 3 to 5 days of varied driving that includes cold starts, city driving, and at least one highway run at sustained speed. The exact time depends on which monitors are slowest to complete on your specific vehicle. The EVAP and catalyst efficiency monitors typically require the most specific conditions and are often the last to set to complete.

Why do my codes come back after I clear them?

Because the underlying fault was not repaired. Clearing removes the stored record, not the problem. Each time the ECU runs the relevant monitor and detects the same condition outside the acceptable range, it logs the code again. A code that returns repeatedly after clearing is telling you that something in that system needs attention, not that the scanner has a problem.

Is it illegal to clear OBD2 codes before selling a car?

Clearing codes with the intent to conceal a known defect before a sale can constitute fraud under consumer protection laws in many US states. The legal specifics vary by jurisdiction. What is consistent is that hiding a known defect from a buyer creates legal and financial exposure. Clearing codes also does not erase the problem effectively, because a pre-purchase scan showing incomplete readiness monitors will signal to any informed buyer that codes were recently cleared.

What is the difference between clearing codes and disconnecting the battery?

Both clear stored codes and reset readiness monitors. A scanner clear removes codes and monitor status without affecting the ECU’s adaptive learned data. A battery disconnect resets codes, monitors, and also erases learned values such as idle calibration, throttle body position, and fuel trim baselines. A scanner clear is the preferred method for most situations. A battery disconnect is more disruptive and requires a longer relearn period before the vehicle returns to fully optimized behavior.

Scroll to Top