There should be a feature on your phone to wipe it clean.

And yeah, for extra security you can just remove your SIM card