Skip to content

Commit

Permalink
cmd: polish stage example of remove
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeorpinel committed Jul 3, 2020
1 parent 5446895 commit 82cdd80
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions content/docs/command-reference/remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,28 @@ Let's imagine we have a stage named `train` in our
corresponding files in the <abbr>workspace</abbr>:

```yaml
train:
test:
cmd: python train.py data.py
deps:
- foo.csv
- data.csv
- train.py
outs:
- model
```
```dvc
$ ls
dvc.yaml dvc.lock
... foo.csv model
dvc.lock dvc.yaml foo.csv foo.csv.dvc model train.py
```

Running `dvc remove` on the stage name will remove this entire entry from
`dvc.yaml`, and delete its outputs:
Running `dvc remove` on the stage name will remove that entry from `dvc.yaml`,
and remove its outputs from `.gitignore`. With the `--outs` option, the outputs
itself (just `model` in this example) are also removed:

```dvc
$ dvc remove train
$ dvc remove train --outs
$ ls
dvc.yaml dvc.lock
... foo.csv
dvc.lock dvc.yaml foo.csv foo.csv.dvc train.py
```

Notice that the dependency `foo.csv` is not removed, since it may be the output
of a previous stage.
Notice that the dependencies (`data.csv` and `train.py`) are not removed.

0 comments on commit 82cdd80

Please sign in to comment.