commands.sh

dvc gc

all

Remove unused files and directories from the cache or remote storage.

More info →

Options (6)

-w, --workspaceboolean

Garbage collect from the cache, keeping only versions referenced by the current workspace

Example: dvc gc {{[-w|--workspace]}}
-a, --all-branchesboolean

Garbage collect from the cache, keeping only versions referenced by branch, tags, and commits

Example: dvc gc {{[-a|--all-branches]}} {{[-T|--all-tags]}} {{[-a|--all-commits]}}
-T, --all-tagsboolean

Garbage collect from the cache, keeping only versions referenced by branch, tags, and commits

Example: dvc gc {{[-a|--all-branches]}} {{[-T|--all-tags]}} {{[-a|--all-commits]}}
-a, --all-commitsboolean

Garbage collect from the cache, keeping only versions referenced by branch, tags, and commits

Example: dvc gc {{[-a|--all-branches]}} {{[-T|--all-tags]}} {{[-a|--all-commits]}}
-c, --cloudboolean

Garbage collect from the cache, including the default cloud remote storage (if set)

Example: dvc gc {{[-a|--all-commits]}} {{[-c|--cloud]}}
-r, --remoteboolean

Garbage collect from the cache, including a specific cloud remote storage

Example: dvc gc {{[-a|--all-commits]}} {{[-c|--cloud]}} {{[-r|--remote]}} {{remote_name}}

Examples (4)

Garbage collect from the cache, keeping only versions referenced by the current workspace

dvc gc [-w|--workspace]

Garbage collect from the cache, keeping only versions referenced by branch, tags, and commits

dvc gc [-a|--all-branches] [-T|--all-tags] [-a|--all-commits]

Garbage collect from the cache, including the default cloud remote storage (if set)

dvc gc [-a|--all-commits] [-c|--cloud]

Garbage collect from the cache, including a specific cloud remote storage

dvc gc [-a|--all-commits] [-c|--cloud] [-r|--remote] remote_name
made by @shridhargupta | data from tldr-pages