# enid prune

#### `enid prune`

```ansi
Prunes the application's historical state by keeping recent heights and deleting older ones.
Pruning options are provided via the `--pruning` flag or `--pruning-keep-recent`.

For the `--pruning` flag, the options are as follows:

- default: Keeps the most recent 362880 states
- nothing: Saves all historical states; nothing will be deleted (i.e., archive node)
- everything: Keeps only the most recent 2 states
- custom: Allows manual specification of pruning options via `pruning-keep-recent`.

In addition to pruning options, the database home directory and backend type should be specified using the `--home` and `--app-db-backend` flags. Valid app-db-backend types include `goleveldb`, `cleveldb`, `rocksdb`, `boltdb`, and `badgerdb`.

Usage:
  enid prune [flags]

Example:
prune --home './' --app-db-backend 'goleveldb' --pruning 'custom' --pruning-keep-recent 100 --pruning-keep-every 10 --pruning-interval 10

Flags:
      --app-db-backend string      Database type for the application and snapshot database
      --chain-id string            Chain ID
  -h, --help                       Help information for prune
      --home string                Database home directory
      --pruning string             Pruning strategy (default|nothing|everything|custom) (default "default")
      --pruning-interval uint      Height interval to delete pruned heights on disk (ignored if pruning is not 'custom'),
                                    This option is retained for compatibility with full pruning options (default 10)
      --pruning-keep-every uint    Offset heights retained on disk after 'keep-every' (ignored if pruning is not 'custom'),
                                    This option is retained for compatibility with full pruning options
      --pruning-keep-recent uint   Number of recent heights to keep on disk (ignored if pruning is not 'custom')

Global Flags:
      --log_format string   Log format (json|plain)
      --log_level string    Log level (trace|debug|info|warn|error|fatal|panic)
      --trace               Print the full stack trace on error
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.eniac.network/reference/cli/enid-prune.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
