For the complete documentation index, see llms.txt. This page is also available as Markdown.

clearState

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

Clears all data for a specified mobile application.

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

Or for a website, when testing on the web platform:

- clearState: https://example.com

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