Find which snapshots contains specific file (and delete if possible)

Hi everyone,

Is there a CLI command that allows searching all snapshots for a specific file and/or path and take action for it?

My use case is: I know I have a file called xxxx.yyy and I want to search which user@path has snapshotted this file and then delete it.

In addition, if I do not know the precise filename or extension - is there a similar or the same command that would allow searching for patterns and include wildcards? i.e. search all user@path snapshots for %xxx%.% or xxx.*

Finally, if such snapshot contain that file and/or path, is there a way to scrub that single file or folder from that particular snapshot? I do not want to delete the whole snapshot, but just this specific file and/or path.


There is content delete | Kopia but for that you need to know the content ID, which is not what you want to do.

Having a feature as you describe would be great. Maybe submit a FR?

I’ve been informed that the deletion portion of this use case is possible with the kopia snapshot fix remove-files command. It does not search, but knowing the specific filename and plugging it as a parameter does indeed delete that file and adding --commit updates the snapshots meeting my requirement.
Awesome - thanks basldfalksjdf and @jkowalski for providing the command!

1 Like