Skip to main content

ClearData

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Delete an app's data and leave it installed — the state of a fresh install, without reinstalling. These call app_clear_data.

ClearData​

public IDictionary<string, object?> ClearData(string app)
public IDictionary<string, object?> ClearData(string app, string bundle)

Deletes an app's data and leaves it installed — a fresh install's state, without reinstalling. The answer holds emptied, kept and, on Android, still_granted: pm clear revokes the runtime permissions the user granted. An iOS simulator keeps its privacy grants and keychain; a real iPhone refuses.

Resets an app on a real iPhone, which cannot clear one in place: it is uninstalled and installed again from its own bundle, a .app or .ipa. Its data container is read back empty, and its privacy permissions, which nothing outside the app can read, are listed under not_read_back. Any other device refuses a bundle.

Examples​

Delete an app's data, and keep it installed​

device.ClearData("com.example.shop");