Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions content/docs/command-reference/gc.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ restored using `dvc fetch`, as long as they have previously been uploaded with

### Removing data in remote storage

If `--cloud` option is provided, command deletes unused data not only in local
DVC cache, but also in remote storage. It means it can be dangerous since in
most cases removing data locally and in remote storage is irreversible.
If the `--cloud` option is provided, this command deletes unused data from the
[default remote storage](/doc/command-reference/remote/default) **in addition**
to deleting it from the local DVC cache. To specify a DVC remote to delete from,
use `--remote` as well.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if you use --remote without --cloud?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the remote is ignored and it operates locally instead. A bit confusing but this text is correct ATM.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p.s. It should probably fail or give a clearer warning at least. Want me to create an issue about it on the core repo @dberenbaum ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p.p.s. the warning is always the same even with -c:

WARNING: This will remove all cache except items used in the workspace of the current repo.

No mention of cloud/remotes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, opened treeverse/dvc#6970


The default remote is cleaned (see `dvc config core.remote`) unless the
`--remote` option is used.
> ⚠️ This is dangerous -- cloud/remote data deletion is irreversible unless
> there is another DVC remote or a manual backup.

## Options

Expand Down