> 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/v2.11.0/documentation/database/clear.md).

# .clear()

Clears the database.

### clear()

```javascript
db.toJSON(); // { users: [{ name: 'Peter' }, { name: 'Michael' }] }

db.clear();

db.toJSON(); // {}
```
