---
schema_version: "1"
id: 1b037106c54d190985f1aeaebbbcc882c14a1216a89713b8b1d0fb7611652fa6
title: Clear Local Storage
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-in-app/guides/android-clear-local-storage.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-clear-local-storage.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9fb952f515f608deff2cf0624f66b2065a9bef7860822c23f7d43708b3c957b2
products:
  - Enhanced In-App Chat
  - Service Cloud Developer Content
---
# Clear Local Storage

Clearing the local storage will delete the local database in the SDK and remove all conversations and entries associated with those conversations from the device.

**important:** This feature requires version 1.5.1 or later of the Enhanced In-App Chat SDK.

This article applies to the following implementations:

| UI SDK | Core SDK |
| :----: | :------: |
|        |    ✅    |


To delete the local storage call the `destroyStorage` method on the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html) object.

```
when(val result = CoreClient.clearStorage(context = applicationContext, clearAuthorization = true)) {
   is Result.Error -> println("error, ${result.exception}")
       else -> println("done")
}
```
