dvc
dvc copied to clipboard
dvc remove --force
At the moment (v2.58.2), dvc remove {target.dvc}
first unprotects {target.dvc}
, at least when applied to .dvc
files.
I'm sure that this is a good reason for this, but this can be painfully slow for large files.
I'd like to request a --force
option that just does all the other dvc remove
stuff, but without unprotecting the targets first. All the normal caveats around use --force
options would apply, and it might be worth double-checking with the user before carrying it out, as is done with dvc commit
, for example.
This would be particularly useful for large imports, where we are not afraid to delete the data from the workspace because we are confident that we can always import it again from the source data registry.
An alternative name for this kind of option might be --no-unprotect
or similar.
Related: #6562
@dberenbaum Hi, is this task still useful? I wanted to start contributing to DVC and I think this would be a good starter task.
I think it's still useful, but I would also ask for input from @iterative/dvc if there are any concerns from the implementation side.
If we do this, I would look into introducing an unprotect: false
option like discussed in #6562. If that were supported in dvc.yaml
and .dvc
files, it should cover both of those issues. I'm not sure we need a CLI flag here since it's a pretty narrow scenario it covers.
I see that there was already an attempt of something similar. I know the product changes all the time and maybe this is a good time to add this option, but to not waste my or your time I'd wait for @iterative/dvc input. Thanks Dave