> For the complete documentation index, see [llms.txt](https://docs.boldminded.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.boldminded.com/dexter/docs-statamic/console-commands.md).

# Console Commands

| Command          | Purpose                                                                |
| ---------------- | ---------------------------------------------------------------------- |
| `dexter:reindex` | Rebuild an index. Omit the index name to rebuild all of them.          |
| `dexter:preview` | Print the documents Dexter would index, without contacting a provider. |
| `dexter:clear`   | Remove all documents from an index, leaving the index itself in place. |
| `dexter:delete`  | Delete an index entirely, including its provider-side settings.        |
| `dexter:doctor`  | Check that Dexter is correctly wired into Statamic.                    |

```bash
# Rebuild everything
php please dexter:reindex

# Rebuild one index
php please dexter:reindex content

# Rebuild one source within an index
php please dexter:reindex content --searchable=collection:pages

# Rebuild through the queue
php please dexter:reindex content --queue

# Preview what would be indexed
php please dexter:preview --index=content --searchable=collection:pages --limit=3

# Empty an index without removing it
php please dexter:clear content --force

# Remove an index and its provider settings
php please dexter:delete content --force
```

`clear` and `delete` prompt for confirmation unless you pass `--force`. On a localized index, both act on every name the index key resolves to — clearing only the first would leave the other locales populated while reporting success.
