Here’s single line code for clear shared prefence data

data.edit().clear().apply();