DIY - Oxygen sensors - B6/7 S4

Why: They commonly fail when people change their downpipes because of the increased exhaust flow. It is also required to remove the oxygen sensors when performing other repairs/modifications. I didn’t want to make two different DIYs for the front and rear oxygen sensors so I combined them into one DIY.

Previous steps required:

  1. Removing the MAF boot and top half of the engine air box.
  2. Loosening the coolant tank so that it can be moved around for clearance.
  3. Jacking up the front end and remove the belly pan - for the rear oxygen sensors

Parts Required:

  1. Oxygen sensors - if replacing and they are different from the front to back.
  2. Zip ties and a cutting tool like side cuts/dykes

Tools Required:

  1. Oxygen sensor specialty socket or a 22 mm wrench for the rear oxygen sensors

  1. Long extensions and 3/8 drive ratchet
  2. Wiring terminal release tool - if replacing the rear oxygen sensors with factory replacement sensors

ECStuning sells a kit that is slightly more expensive then just one factory tool.


The steps are broken up into a and b sections for the front and rear oxygen sensors.

  1. Disconnect the electrical connector of the oxygen sensors. The electrical connectors are located on the plastic connector brackets on the cowl wall behind the MAF sensor/boot and coolant tank. The front oxygen sensors have black six pin connectors and the rear oxygen sensors have green or brown four pin connectors.

2a. Loosen the front oxygen sensors from the top of the downpipes. You have to look down the back of the engine to see the sensor bodies. I like to slide the oxygen sensor tool down the wires to the sensor body, then crack the sensors loose with extensions and the ratchet, turn the sensor bodies loose by hand, and pull the sensors out.

Passenger’s side front oxygen sensor:

Driver’s side front oxygen sensor:

2b. Loosen the rear oxygen sensor bodies. I find it easier to use a 22 mm wrench then a oxygen sensor socket for loosening the rear oxygen sensors. The below picture shows a car with rear O2 sensor spacers so your car will probably not have the rear oxygen sensors spaced out so far.

3b. Remove the rear oxygen sensors.

Always label the oxygen sensors so that they are not mixed up when reinstalling. I can’t tell you guys how many times I have seen people ask why the check engine light comes on with oxygen sensor codes present after exhaust work is done. I have done it too so just go ahead and label your oxygen sensors.

The sensor wiring is usually attached to the transmission so you have to pull the wires up and free. If you are replacing the rear oxygen sensors then I have cut the connector off at the top and then pulled the sensor and wire out from the bottom rather than having to

4b. If you are replacing the rear oxygen sensors with factory replacements then you have to also replace the electrical connectors on the wiring harness side because the new sensors use generic black connectors instead of the original color coded (green and brown) connectors. To do that you need to slide the protective rubber wiring harness cover off the back of the harness side connector, use a pick tool or flat head screwdriver to pop the pink locking pin out of the inside of the new connector, use a wiring terminal removal tool to release the tabs of the wiring terminals, pull the wiring terminals out one at a time and swap them into the new connectors, you will hear a click when the terminals snap into place, and once all four wiring terminals are swapped over reinstall the pink locking pin and protective rubber wiring harness cover on the back of the connector.

5b. Audi wanted to save money so they use generic replacement sensors with the longest possible length wires required so I like to zip tie the excess wiring out of the way.

I really need to get a set of those terminal tools. Using paper-clips is a good way to get pissed off quickly.

Really glad I came across this. I’m getting those terminal tools as well. Thank you.

If I am installing catless down pipes and JHM tune, are the o2 sensors really doing anything? I know the rears just measure cat efficiency, so those shouldn’t really matter with the tune, correct? Are the fronts still working as they should? I have a CEL for B1S1, and am wondering if I should replace both front o2 sensors before flashing the tune or if it will override the sensors? I just don’t want to drop $4-500 for all four o2 sensors if I don’t have to.

I would suggest starting a post on this in the main section. But anytime you have a S1 code you need to replace the sensor. Those are the more important ones. The rear 02s control more then just checking to see if you have cats. They help test the health of the primary 02s they also help with fuel mileage and a few other smaller efficiency things. They are important. Of you change a sensor on one bank it’s a good idea to change the other one to.

Know this is old but if I had rear 02 replaced with new oe sensors how would I know if they are correct bank orientation since they are not green and brown anymore? Is it possible to “swap” or screw up the install with the new sensors?

I am now getting b1s1 and b2s1 too rich codes following rear 02 replacement. My front 02’s have less than 15k miles on them. Thanks for any help in finally resolving this revolving door of 02 sensor codes I am having since s/c install a year ago.

There’s no difference between the B1 and B2 sensors. Just make sure the driver side sensor plugs into the driver side by the firewall and the passenger side plugs into the passenger side.

Thats what I thought. They are. Thanks for confirmation.

Need to figure out what the hell is going on with my fronts then. Frustration continues…

Thats what I thought. They are. Thanks for confirmation.

Need to figure out what the hell is going on with my fronts then. Frustration continues…