2020-07-23 16:55:39 +01:00
|
|
|
# dvc gc
|
|
|
|
|
2020-07-31 16:03:25 +01:00
|
|
|
> Remove unused files and directories from the cache or remote storage.
|
2020-07-23 16:55:39 +01:00
|
|
|
> More information: <https://dvc.org/doc/command-reference/gc>.
|
|
|
|
|
2020-07-31 16:03:25 +01:00
|
|
|
- Garbage collect from the cache, keeping only versions referenced by the current workspace:
|
2020-07-23 16:55:39 +01:00
|
|
|
|
|
|
|
`dvc gc --workspace`
|
|
|
|
|
2020-07-31 16:03:25 +01:00
|
|
|
- Garbage collect from the cache, keeping only versions referenced by branch, tags, and commits:
|
2020-07-23 16:55:39 +01:00
|
|
|
|
|
|
|
`dvc gc --all-branches --all-tags --all-commits`
|
|
|
|
|
2020-07-31 16:03:25 +01:00
|
|
|
- Garbage collect from the cache, including the default cloud remote storage (if set):
|
2020-07-23 16:55:39 +01:00
|
|
|
|
|
|
|
`dvc gc --all-commits --cloud`
|
|
|
|
|
2020-07-31 16:03:25 +01:00
|
|
|
- Garbage collect from the cache, including a specific cloud remote storage:
|
2020-07-23 16:55:39 +01:00
|
|
|
|
2020-07-31 16:32:51 +01:00
|
|
|
`dvc gc --all-commits --cloud --remote {{remote_name}}`
|