You can’t clear a permanent OBD2 code yourself.
A scan tool will not remove it, and neither will disconnecting the battery. The car’s own computer erases it after the problem is fixed and the car’s self-test runs again and passes. Source: California Bureau of Automotive Repair.
What is a permanent OBD2 code?
A permanent code is a diagnostic trouble code the car keeps in memory even after a normal reset. Regular codes disappear when you clear them with a scanner. Permanent ones are built not to. California’s Bureau of Automotive Repair says they “cannot be reset by disconnecting the vehicle’s battery or cleared using an On-Board Diagnostic (OBD) scan tool.”
Federal rules for heavy-duty engines describe the same idea: a permanent code “can only be erased by the OBD system itself and cannot be erased through human interaction with the OBD system or any onboard computer” (40 CFR 86.010-2). That text covers heavy-duty engines, not typical passenger cars, but it shows how the system is designed.
Why a scanner can’t erase it
The idea behind this design is to keep a quick clear from hiding a real problem before an inspection. If a scanner could wipe the code, the code would tell nobody anything.
How a permanent code actually goes away
- Read all the codes first. Some scanners list permanent codes separately, so check yours. Write them down.
- Fix the cause. The code will not go away while the problem is still there.
- Clear the regular codes with your scanner if you want. This does not remove the permanent code.
- Drive normally. The car has to re-run the test that found the fault. When it passes, the car erases the permanent code on its own. California’s Bureau of Automotive Repair puts it this way: “allow the vehicle enough drive time to re-run the monitor.”
How long does it take?
There is no single number. It depends on the car and the test that set the code, so be skeptical of anyone who gives a fixed number of drive cycles without naming the car.
One figure is easy to confuse with this. In California’s Smog Check program, permanent codes are ignored only after the car has completed at least 15 warm-up cycles and been driven at least 200 miles since its OBD data was last cleared. That is an inspection rule, not a promise of when the code erases. A warm-up cycle means the engine coolant rises at least 40°F and reaches at least 160°F after starting.
Will disconnecting the battery remove it?
No. It also erases radio presets and learned settings, and it resets your readiness monitors, which can make an emissions test harder, not easier. See our guide to clearing OBD2 codes for what clearing does and doesn’t do.
What to do before an emissions test
- Fix the cause first.
- Give the car enough normal driving for its own tests to finish. Your state’s inspection program has its own rules, so check it.
- Do not clear codes right before the test.
Need a scanner that shows more than the basics? Compare the options in our OBD2 scanner guide, and see common OBD2 error codes explained.
Frequently Asked Questions
Do permanent codes ever go away?
Will disconnecting the battery remove a permanent code?
How long does a permanent code take to clear?
Can I pass an emissions test with a permanent code?
Will a more expensive scanner clear it?
Sources
- California Bureau of Automotive Repair, ARSC News, Fall 2019, Permanent Diagnostic Trouble Codes.
- 40 CFR 86.010-2 (heavy-duty engines), Cornell Legal Information Institute.
Sources checked October 8, 2026. Rules vary by state and vehicle. Check your own inspection program and owner’s manual.
I’m Avi, a parent, car owner and tech lover who researches AliExpress finds for real driving life – from dash cams and diagnostics tools to the gear that survives a long road trip with kids in the back seat. I spend hours digging through specs, buyer reviews, and automotive forums (and tracking which travel toys parents report actually stay quiet past mile 50) so you don’t have to – and I only recommend what holds up under real buyer scrutiny.