How do I delete the entire snapshot on CLI?

For example, I have:

root@kopia-test:~# kopia snapshot list 
  2021-05-19 15:54:53 CEST kc4df8c3d4f3ba311c3aca43909b82c7d 62.9 KB drwxr-xr-x files:99 dirs:79 (latest-4)
  + 2 identical snapshots until 2021-05-21 17:31:47 CEST
  2021-05-24 15:13:57 CEST kaa095063492905c4a13502c87d1df52a 1.2 GB drwxr-xr-x files:99 dirs:79 (latest-1,annual-1,monthly-1,weekly-1,daily-1,hourly-1)

I need to delete completely “root@kopia-test:/root/example”

From man

Snapshot ID or root object ID to be deleted

I cannot understand what is “root object ID”?

I guess it is “root@kopia-test:/root/example”

root@kopia-test:~# kopia snapshot delete root@kopia-test:/root/example --delete
ERROR: error deleting snapshots by root ID root@kopia-test:/root/example: no snapshots matched root@kopia-test:/root/example

I also tried to get “root object ID” using flag “-m”, but have not discovered this.

root@kopia-test:~# kopia --version
0.8.3 build: e258319c9564130cbb83bd94a822267af00b79d1 from: kopia/kopia

Currently you need to delete all k<hash> objects - when they are gone, the snapshot source will disappear. Deleting all snapshots for a given source would be a nice feature to add.

1 Like

Thanks for the clarification and for your product!