You problem is how you get the preferences:
SharedPreferences preferences = context.getSharedPreferences("PREFERENCE", 0);
You need to get ALL the preferences:
SharedPreferences preferences = getPreferences(0);
Now, to remove all the SharedPreferences use Editor.clear()
Mark in the editor to remove all values from the preferences. Once commit is called, the only remaining preferences will be any that you have defined in this editor.
SharedPreferences preferences = getPreferences(0);
SharedPreferences.Editor editor = preferences.edit();
editor.clear();
editor.commit();
According documentation:
Returns a reference to the same Editor object, so you can chain put calls together.
I bet this will work also:
SharedPreferences preferences = getPreferences(0);
SharedPreferences.Editor editor = preferences.edit();
editor.clear().commit();