Skip to content

collection('something').delete() does not recursively delete nested collections #6281

Answered by mikehardy
lockieluke asked this question in Ideas
Discussion options

You must be logged in to vote

Unfortunately that's not the way this has to work because deleting recursively requires running firestore operations in large batches (because there is a 500 document limit to deletes, and the recursive operation may total more than that...), and it's unreliable in a mobile context. It has to be done in a callable function, which is not something we can directly package for people.

But firebase has provided ample documentation and sample code for this case, and I use it myself in my apps. It works great

This is what you want

Integrate t…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by mikehardy
Comment options

You must be logged in to vote
10 replies
@lockieluke
Comment options

@mikehardy
Comment options

@lockieluke
Comment options

@mikehardy
Comment options

@lockieluke
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants