In device settings, select that user installed applications are wiped and enable Content Protection / Encryption.
More info:
- How to delete all data and applications from the BlackBerry smartphone running OS 7.1 and earlier using the Security Wipe option: http://support.blackberry.com/kb/articleDetail?ArticleNumber=000014058
- How to change the setting for Content Protection on the BlackBerry smartphone: http://support.blackberry.com/kb/articleDetail?articleNumber=000011963