shutdownAllDataStores

fun shutdownAllDataStores(context: Context? = null)

Shuts down all DataStore instances by cancelling their coroutine scopes and clearing the in-memory cache.

Parameters

context

If provided, also deletes the DataStore files from disk (except those with PERSISTENT_DATASTORE_PREFIX). Pass context when you need to clear persisted data (e.g., wipeData, tests).