Forgetting all snapshots with a specific tags

I have used this command to get all snapshots by a specific tag and extract the “id’s” and pass them as a string split by " " (a space).

restic forget $(restic snapshots --tag testing-backup-script --json | jq '.[] | .short_id' | jq -s | jq -r 'join(" ")')

As I didnt found anything similiar, I have wrote the command by my self at the end.
Maybe this can help someone else :slight_smile:
But I’m not sure if its a good idea, to revive this old topic…

1 Like