There isn’t anything that allows you set automatic purges of documents after replication.
That said, we do not have support for “local documents” in CBM 2.0 (@jens can corroborate).
If you are looking for local-only storage options, you can create a separate database that’s local only by not setting it up for replication or you can exclude that documentId from the push replication filter (although that would mean that you track the list of document ids to push up).
If you want to delete local documents, we do have purge()
API in CBM 2.0 that you can use to remove the documents .
https://github.com/couchbase/couchbase-lite-ios/blob/feature/2.0/Swift/Database.swift#L228