How to remove unused blobs?

When I issue restic check, I get that there is no error. When I issue restic check --check-unused thete is an error that unused blob <data / 23ef60acl>” and “Fatal: repository contains error."

When I run restic forget --prune, I get a warning that ciphertext verification failed for a blob. That blob seems unused since restic find --blob doesn’t find it.

So, it seems there are unused blobs that are corrupted, eg, due to CTL+Cing the operation.

Setting max-unused 0 suggested in the link below didn’t help

https://forum.restic.net/t/automatically-remove-unused-blobs/4128

I want to delete packs and blobs that are not used.

Maybe Help debugging a blob invalid hash - #8 by u_x has information which help you troubleshoot your issue :slight_smile:

You can ignore the “unused blob” error these are not a problem for the repository (I guess I should finally open that PR to drop the --check-unused option).

Which restic version are you using? Please provide the full error message shown by prune. It’s a bit hard to say more about the cause of that error without context.

1 Like