2025-03-14 21:59:59 -06:00
|
|
|
# dvc gc
|
|
|
|
|
|
|
|
|
|
> Remove unused files and directories from the cache or remote storage.
|
|
|
|
|
> More information: <https://dvc.org/doc/command-reference/gc>.
|
|
|
|
|
|
|
|
|
|
- Garbage collect from the cache, keeping only versions referenced by the current workspace:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dvc gc {{[-w|--workspace]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Garbage collect from the cache, keeping only versions referenced by branch, tags, and commits:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dvc gc {{[-a|--all-branches]}} {{[-T|--all-tags]}} {{[-a|--all-commits]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Garbage collect from the cache, including the default cloud remote storage (if set):
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dvc gc {{[-a|--all-commits]}} {{[-c|--cloud]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Garbage collect from the cache, including a specific cloud remote storage:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dvc gc {{[-a|--all-commits]}} {{[-c|--cloud]}} {{[-r|--remote]}} {{remote_name}}`
|