How do i remove files which are no longer tracked by dvc from dvc remote ssh storage


#1

Hi,

I had added a folder inputs to remote ssh dvc storage.
After some time, i decided to remove this folder
so i did

  • dvc remove inputs.dvc
  • did a git commit and push of the dvc changes
    But if i use an older commit where the inputs folder was tracked by dvc i am still able to pull inputs folder from remote dvc storage

How can i remove the file from the remote ssh dvc storage?


#2

Hi @shaijujanardhanan !

We have a dvc gc command that does precisely that. For example, if you want to remove all cache that is not used in any of your git tags and branches on your default remote, you could do dvc gc -caT. See https://dvc.org/doc/commands-reference/gc for more info.

Thanks,
Ruslan


#3

Thanks @kupruser for the info