How to clear Firestore persistence data?
There's no API for manipulating the local cache in any way. The Firestore SDK chooses what to store based on queries that you perform.
On Android, users can manually clear the local data for an app without uninstalling it. This will remove all the data locally stored by the app.
If you have a specific use case, please feel free to file a feature request.
There is now a feature in the API for clearing persistence. It is not recommended for anything but tests, but you can use
firebase.firestore().clearPersistence().catch(error => {
console.error('Could not enable persistence:', error.code);
})
It must run before the Firestore database is used.