How do you clean the oxygen sensor?

you replace them

Option 2: Replace the oxygen sensor only if it's bad. They do wear out and the Chilton's or Hayne's manual for your car should have directions on how to test it. An OEM replacement sensor for some popular cars is about $240, and your car probably has two of them. If you replace it with a cheap sensor from a discount parts store, you may be throwing away a perfectly good high quality sensor which just needs to be cleaned.

Here's a quote from a Toyota mechanic with 32 years of experience, on another web site:

"You don't need to replace them, remove them and clean them. [If you read an O2 sensor malfunction code] The computer is saying the vehicle is running a little rich or lean. IT DOES NOT mean the sensor(s) are bad. Auto parts stores just want to sell you products. If I received a dollar every time a 02 sensor was replaced on a vehicle I'd have millions."

That said, there doesn't seem to be an "official" way to do it, or an entirely safe way. But since you ask, here are some ways people have done it:

1. Clean it with a throttle body aerosol cleaner which states that it's safe for oxygen sensors.

2. Heat it up with a torch and dip it in water. Use an air hose to clean the gunk out. Repeat.

3. Soak it in gasoline overnight. Shake the dissolved gunk out.

It's up to you to stay safe, so if in doubt, drive over to a shop and pull out the credit card. It's one of those things, like nobody's going to tell you how to clean your bathroom mirror with ammonia at $0.99 a gallon, but lots of people are happy to sell you ammonia with blue die in it at $4.50 a pint.