> For the complete documentation index, see [llms.txt](https://simpldb.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://simpldb.js.org/documentation/database/deletecollection.md). Agents can also search and read this documentation through its [MCP server](https://simpldb.js.org/~gitbook/mcp).

# .deleteCollection()

Deletes a collection.

### deleteCollection(name)

| **Parameter** | **Description**                                                                                                                                      |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| name          | <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></p><p>The name of the collection</p> |

| **Returns**                                                                                         | **Description**                                        |
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | Whether the collection was successfully deleted or not |

####

```javascript
db.deleteCollection('users'); // true
```
