Code it out properly, s4wiki covers this, eskonf and those 3 are not enough.
that is written in s4wiki: If you intend to disconnect/remove the sensors, the first thing to try is to configure ESKONF (13 bytes starting at 0x10C75):[58]. As a side benefit, even if you still intend to leave the sensors installed and connected, you should not need to disable circuit diagnosis.
The rear o2 sensor section a little bit confuse me. There are several subsections to switch it off.