DVC remove unused file from remote repository S3

401 views Asked by At

I'm trying to remove 1 file from S3 remote repository which is no longer tracked by DVC.

So, I did:

  • dvc remove .dvc file
  • git add & commit the .gitignore and .dvc files
  • run dvc gc -c --workspace

however, the process of deleting 1 file (13KB) took 6 minutes, is that normal or is there a step I'm missing?

here's the details for dvc gc -c --workspace:

delete process img1

delete process img2

reference: https://dvc.org/doc/command-reference/gc

1

There are 1 answers

0
Shcheklein On

From the dvc gc documentation:

-w, --workspace - keep only files and directories referenced in the workspace. 
This option is enabled automatically with the other scope options (below).

It means that this command removes all the files except those that are still in use (referenced) in the workspace and only in the workspace.

In your case this command would remove data that belongs to the previous commits in the repo. This might be taking time.