Browse SDKs · React Native
Platform
SDKsReact Native

Clear all local messages

Clear all message records stored locally on the current device using the OpenIM React Native SDK.

Copy

Clear all message records stored in the local SQLite database for the current logged-in account on this device:

await OpenIMSDK.deleteAllMsgFromLocal();

Return value

A resolved Promise confirms that all message records in the local database on the current device have been deleted. Historical messages remain preserved on the server.

This is an irreversible, account-level local action. Before executing, explain the impact clearly to the user and require secondary confirmation. This operation modifies only local device storage; it does not affect other active sessions or trigger multi-device deletion events. Clear local conversation lists and view caches in the client UI accordingly.