# clearState

This command removes cached data related to an app.

## Examples

Run the command without arguments to clear the state of the active app uploaded to Moropo:

```yaml
- clearState
```

Specify an app ID to clear the state of a specific app (other than the uploaded app):

```yaml
- clearState: com.facebook.app
```

On iOS, it will remove all application data.

On Android, it will remove all application data and accounts, shared preferences, databases and other OS-level data related to the app)&#x20;

## Related Commands

[clearKeychain (iOS Only)](/creating-tests/commands/clearkeychain.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.moropo.com/creating-tests/commands/clearstate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
