# snap_clearState

> Reference documentation for the `snap_clearState` method of the Snaps API.

<SnapsAPIReference method={{"name":"snap_clearState","description":"Clear the entire state of the Snap.","parameters":{"kind":"object","type":"{ encrypted?: boolean | null }","description":"An object containing the parameters for the `snap_clearState` method.","required":false,"properties":[{"kind":"primitive","type":"boolean","description":"Whether to use the separate encrypted state, or the\nunencrypted state. Defaults to the encrypted state. Encrypted state can only\nbe used if the client is unlocked, while unencrypted state can be used\nwhether the client is locked or unlocked.\n\nUse the encrypted state for sensitive data (such as private keys or secrets),\nand the unencrypted state for non-sensitive data that needs to be accessed\nwhile the client is locked.","name":"encrypted","required":false}]},"result":{"kind":"primitive","type":"null","description":"This method does not return any data, so the result is always `null`."},"subjectTypes":["snap"],"examples":[{"examples":[{"language":"ts","content":"await snap.request({\n  method: 'snap_clearState',\n  params: {\n    encrypted: true, // Optional, defaults to true\n  },\n})\n"}]}],"restricted":false}}  />
