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



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?


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 for more info.



Thanks @kupruser for the info