Skip to main content

ClearData · ResetFromBundle

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​

func (d *Device) ClearData(ctx context.Context, app string) (ClearedData, error)

ClearData deletes an app's data and leaves it installed — the state of a fresh install, without reinstalling. Android's pm clear also revokes the runtime permissions the user granted; an iOS simulator keeps its privacy grants and keychain. A real iPhone refuses.

ResetFromBundle​

func (d *Device) ResetFromBundle(ctx context.Context, app, bundle string) (ClearedData, error)

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

Examples​

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

cleared, err := dev.ClearData(ctx, "com.example.shop")
if err != nil {
return err
}
fmt.Println("emptied:", cleared.Emptied, "still granted:", cleared.StillGranted)