If unrooting is a temporary measure then backing up your current ROM is a perquisite. With Nandroid or ROM Manager it is possible to create a snapshot of your handset’s current state and restore it at a later date.
2: Download HTC Sync
Unrooting a Desire is done via RUU files supplied by HTC. These need the HTC sync drivers to work. Get them at http:// www.htc.com/uk/help/ . Select HTC Desire and click News & Download to display the link.
3: Desire ROM
The Desire ROM is required so it can be flashed to the handset. These are available from the XDA developers forum via shippedroms. com at http://goo.gl/9ohBZ . Download the ROM that matches your handset.
4: Run HTC Sync
With everything downloaded it’s now time to install HTC Sync. Once that is done run the program and connect the phone to the computer via USB. When the Connect to PC menu appears select Sync.
5: Run the RUU file
With the handset connected it’s time to locate the downloaded RUU file and run it. Follow the prompts and the stock ROM will be flashed to your device. Make sure that your phone has plenty of battery charge beforehand.
6: Reboot into stock
Once the flashing process has completed the phone should reboot back into HTC Sense. You’re now back to your old default ROM. If the handset doesn’t boot up and returns an error message reconnect the USB and run the RUU again.
7: A bit of checking
Once the stock ROM is on the device you can check whether the root access has disappeared. Install Terminal Emulator from the Market. Run it and enter “su”. If it says Permission Denied then you’re successfully root free.
8: Go back to your root
Should you re-root your phone, repeat the procedure that was used before. If you still have your backed-up custom ROM from step 1 you can use ROM Manager to flash it and get back to your previous rooted state.
9: Other devices
The previous eight steps worked for our HTC Desire but other models of Android will require different processes. Resources such as XDA Developers and theunlockr.com are great places to find alternative solutions.
10: Other options
One such solution is the Easy Rooting Toolkit. The thread at http://bit.ly/tUhQvM has a dedicated unrooting section. The only stipulation is that it shouldn’t be used if the device wasn’t rooted with this tool.
How To Unroot Android Phone
Source : Android Tips, Tricks, Apps and Hacks