Need to return your Nexus S back to T-Mobile your any other carrier for any reason? Well, you can unroot your Nexus S completely back to stock, very easy to do by following the step-by-step guide outlined here.
(For Nexus S 4G, please see How to Unroot Nexus S 4G.)
Step 1. Download the appropriate stock OTA zip file for your Nexus S.
Download this zip for i9020T and i9023 models: