github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/eval/delete.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: eval delete'
     4  description: |
     5    The eval delete command is used to delete evaluations.
     6  ---
     7  
     8  # Command: eval delete
     9  
    10  The `eval delete` command is used to delete evaluations. It should be used
    11  cautiously and only in outage situations where there is a large backlog of
    12  evaluations not being processed. During most normal and outage scenarios,
    13  Nomad's reconciliation and state management will handle evaluations as needed.
    14  
    15  The eval broker is expected to be paused prior to running this command and
    16  un-paused after. These actions can be performed by the
    17  [`operator scheduler get-config`][scheduler_get_config]
    18  and [`operator scheduler set-config`][scheduler_set_config] commands respectively.
    19  
    20  ## Usage
    21  
    22  ```plaintext
    23  nomad eval delete [options] [args]
    24  ```
    25  
    26  It takes an optional argument which is the ID of the evaluation to delete. If
    27  the evaluation ID is omitted, this command will use the filter flag to identify
    28  and delete a set of evaluations.
    29  
    30  When ACLs are enabled, this command requires a `management` token.
    31  
    32  ## General Options
    33  
    34  @include 'general_options.mdx'
    35  
    36  ## Delete Options
    37  
    38  - `-filter`: Specifies an expression used to filter evaluations by for
    39    deletion. When using this flag, it is advisable to ensure the syntax is
    40    correct using the eval list command first. Note that deleting evals by filter
    41    is imprecise: for sets of evals larger than a single raft log batch, evals can
    42    be inserted behind the cursor and therefore be missed.
    43  
    44  - `-yes`: Bypass the confirmation prompt if an evaluation ID was not provided.
    45  
    46  ## Examples
    47  
    48  Delete an evaluation using its ID:
    49  
    50  ```shell-session
    51  $ nomad eval delete 9ecffbba-73be-d909-5d7e-ac2694c10e0c
    52  Successfuly deleted 1 evaluation
    53  ```
    54  
    55  Delete all evaluations with status `pending` for the `example` job:
    56  
    57  ```shell-session
    58  $ nomad eval delete -filter='Stauts == "pending" and JobID == "example"'
    59  Are you sure you want to delete 3 evals? [y/N] y
    60  
    61  Successfuly deleted 3 evaluations
    62  ```
    63  
    64  Delete all evaluations for the `system` and `service` whilst skipping all
    65  prompts:
    66  
    67  ```shell-session
    68  $ nomad eval delete -filter='Scheduler == "system" or Scheduler == "service"' -yes
    69  Successfuly deleted 23 evaluations
    70  ```
    71  
    72  [scheduler_get_config]: /docs/commands/operator/scheduler/get-config
    73  [scheduler_set_config]: /docs/commands/operator/scheduler/set-config