Sample code for my blog post. You can read the full article here Blog post: How to Clear User Data in your Android Application programmatically