API version: 0.3.0

---

# `database:drop`

Resets the entire instance by deleting all data from every connected backend: all nodes and
relations in the graph database, the MongoDB database, all objects in S3 object storage, all
Elasticsearch indices, all Redis keys (including the generation of the schema cache, whose compiled files of this
instance are removed as well), and all RabbitMQ queues.

The id indices created by [`index:ensure`](/command/index-ensure.md) and the element type index in the system bucket are
deleted as well. The command takes the maintenance locks and refuses to run while an index or type index build is
running.

Options:

- `-f`, `--force` - skips the interactive "Are you sure?" confirmation prompt. Without it, the
  command asks for confirmation and aborts (returning a non-zero exit code) if not confirmed.
- `--no-files` - skips deleting the objects in S3 object storage.

> **⚠ Destructive**
>
> This command is irreversible and deletes everything the instance currently stores - there is no
> per-collection or per-graph option. Only use it in throwaway or test environments, or right
> before restoring a backup with `backup:load`.

## Help

```bash
php bin/console database:drop --help
```

```text
Description:
  Resets all connected databases.

Usage:
  database:drop [options]

Options:
  -f, --force|--no-force        If enabled, command will not ask for manual confirmation.
      --no-files|--no-no-files  Disable deletion of object storage (S3) data, i.e. keep the storage and upload buckets untouched.
  -h, --help                    Display help for the given command. When no command is given display help for the list command
      --silent                  Do not output any message
  -q, --quiet                   Only errors are displayed. All other output is suppressed
  -V, --version                 Display this application version
      --ansi|--no-ansi          Force (or disable --no-ansi) ANSI output
  -n, --no-interaction          Do not ask any interactive question
  -e, --env=ENV                 The Environment name. [default: "prod"]
      --no-debug                Switch off debug mode.
      --profile                 Enables profiling (requires debug).
  -v|vv|vvv, --verbose          Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```

## Example

```bash
php bin/console database:drop -f
```

```text
    ▄
  ▄▀ ▀▄  Ember Nexus API
   ▀█▀   v0.3.0, production mode

  Database Drop

┌ Task 1 of 6: Cypher ──────────────────────────────────────────────────────────
│ Deleting Cypher data...
└ Successfully deleted cypher data.

┌ Task 2 of 6: MongoDB ─────────────────────────────────────────────────────────
│ Deleting Mongo data...
└ Successfully deleted Mongo data.

┌ Task 3 of 6: Object Storage ──────────────────────────────────────────────────
│ Deleting Object data...
└ Successfully deleted object storage.

┌ Task 4 of 6: Elastic Search ──────────────────────────────────────────────────
│ Deleting Elastic data...
└ Successfully deleted Elastic data.

┌ Task 5 of 6: Redis ───────────────────────────────────────────────────────────
│ Deleting Redis data...
└ Successfully deleted Redis data.

┌ Task 6 of 6: RabbitMQ ────────────────────────────────────────────────────────
│ Deleting RabbitMQ data...
└ Successfully deleted RabbitMQ data.

▶ Database successfully dropped.
```

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [cron:update-ownership](/command/cron-update-ownership.md)

Next: [index:ensure](/command/index-ensure.md)
