02 Delete Collection
The one with the safety word
- session
- json
- refresh
02 Delete Collection drops an entire collection - and everything in it - from your ZMongo store. It's the destructor node, and unlike its sibling Create Collection, it comes with a confirmation guardrail because deleting is irreversible.
If you're building a cleanup or reset step into a pipeline (wipe the test bucket before a fresh run, clear a staging collection), this is the node. If you're just tidying up manually, you could equally do it from the backend console - but having it in the graph means you can automate teardown the same way you automate setup.
The safety word: confirm_collection_name
Three required inputs:
session- from the API Key Session node.collection_name- the collection you want gone.confirm_collection_name- must be a character-for-character match ofcollection_name, or the node refuses.
That's the whole safety mechanism, and it's a good one. The source is explicit: deletion requires matching collection_name and confirm_collection_name, otherwise you get a 400-style error payload. No confirm, no delete. It won't stop a determined mistake - confirming the wrong-but-matching name still nukes it - but it stops the accidental one-character typo from torching a collection you care about.
Outputs are the standard pair:
json- backend result: success flag, message, status code.refresh- dirty token to force downstream nodes to re-pull data after the deletion.
Gotchas
- Feed both name fields from the same upstream value (a text input or a node output) rather than typing them twice - then they can't drift apart.
- There's no "confirm" for the whole-collection blast radius. If your collection holds generated images or hard-won prompts, make sure the delete only fires when you actually want it gone. A common pattern is a boolean gate upstream that only feeds the node in cleanup mode.
- In Local File Store mode this deletes the on-disk directory for that collection. Gone means gone there too.
Install
ComfyUI Manager → search ComfyUI-ZMongo → install → restart, or clone manually:
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
Note the pack's real requirements.txt is heavy (langchain, sentence-transformers, pymilvus, etc.) even though this node only touches the API session - first import after install is slower than most packs.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| session | ZMONGO_API_SESSION | — | |
| collection_name | STRING | — | |
| confirm_collection_name | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| json | STRING | — |
| refresh | STRING | — |