It is as simple as connecting the OBD cable and hitting read.
Having the battery disconnected for a long time will not after the flash memory. It can only be written to during the flash process.
I beleive the ECU will adapt the air flow readings by about 22% before it sets an error code. It may take about 30 minutes of driving to adapt fully. This adaptation occurs in the serial eprom which is separate from the flash memory.
I believe the ECU sets the fault code at 10% but will adapt to 25%. At least most of the 1.8T's I played with seemed to act that way.