Edit on GitHub

exp remove

Delete specific dvc experiments from the project.


usage: dvc exp remove [-h] [-q | -v] [--queue | -A]
                      [<name> [<name> ...]]

positional arguments:
   experiment    Experiments to remove.


Deletes one or more experiments, indicated by name (see dvc exp run) or ID (only queued experiments).

With --queue, the list of experiments awaiting execution is cleared instead.

Note that all the checkpoints in an experiment are removed by this command.


  • --queue - remove all experiments that haven't been run yet (defined via dvc exp run --queue).
  • -A, --all - remove all experiments (includes --queue).
  • -h, --help - shows the help message and exit.
  • -q, --quiet - do not write anything to standard output. Exit with 0 if no problems arise, otherwise 1.
  • -v, --verbose - displays detailed tracing information from executing the dvc pull command.


Let's say we have dvc exp run 3 experiments in our project:

$ dvc exp list

To remove any of them, give their names to dvc exp remove. Or use the --all (-A) option to remove them all at once:

$ dvc exp remove exp-1dad0 exp-1df77

$ dvc exp list

$ dvc exp remove -A

$ dvc exp list

Nothing is listed after the last dvc exp list because they're all gone.

The same applies to queued experiments but these won't have a name to give to dvc exp remove yet (unless you specified one). Alternatively, you can use their ID (shown when queued, and by dvc exp show). Let's queue a few experiments and then delete some of them:

$ dvc exp run --queue -S train.min_split=64
Queued experiment 'e41d5b4' for future execution.
$ dvc exp run --queue -S train.min_split=32 --name split32
Queued experiment '5751540' for future execution.
$ dvc exp run --queue -S train.min_split=16 --name split16
Queued experiment '8de9a6c' for future execution.

$ dvc exp remove e41d5b4 split16

$ dvc exp show --include-params=train.min_split --no-pager
โ”ƒ neutral:**Experiment**            โ”ƒ neutral:**Created**      โ”ƒ neutral:**State**  โ”ƒ metric:**avg_prec** โ”ƒ metric:**roc_auc** โ”ƒ metric:**train.min_split** โ”ƒ
โ”‚ workspace             โ”‚ -            โ”‚ -      โ”‚  0.57553 โ”‚ 0.94652 โ”‚ 2               โ”‚
โ”‚ master                โ”‚ Aug 02, 2021 โ”‚ -      โ”‚  0.53252 โ”‚  0.9107 โ”‚ 2               โ”‚
โ”‚ โ””โ”€โ”€ 5751540 [split32] โ”‚ 04:57 PM     โ”‚ Queued โ”‚        - โ”‚       - โ”‚ 32              โ”‚

๐Ÿ› Found an issue? Let us know! Or fix it:

Edit on GitHub

โ“ Have a question? Join our chat, we will help you:

Discord Chat