clearState

Clear app data, cache, and preferences to reset to fresh install state.

Clears all data for a specified mobile application.

circle-exclamation

Usage examples

To clear the state of the current app, use add the clearState command alone.

- clearState

If you want to clear the state of a specific app by its ID, add the app ID:

- clearState: app.id

You can also add a label when invoking clearState to improve the readability of the report.

- clearState:
    appId: app.id
    label: Reset ExampleApp

Platform-specific behavior

The command's behavior differs based on the mobile operating system.

On Android, the clearState command is equivalent to running:

adb shell pm clear {package name}

It removes all app-related data from the device, such as shared preferences, databases, and accounts.

Last updated