I\'m looking for a way to clear an entire collection. I saw that there is a batch update option, but that would require me to know all of the document IDs in the collection.
Tested in VueJS
import db from '@/firebase/init' let ref = db.collection('YOUR_COLLECTION_NAME') db.collection(path).onSnapshot(snapshot => { snapshot.docs.forEach(doc => { ref.doc(doc.id).delete() .catch(error => { console.log(error) }) }) })