How do you fix an oxygen sensor?

Unfortunately there is no fixing an O2 sensor. If the "check engine" light is on due to an O2 sensor, it can only be remedied by replacing the bad sensor.