How can i make sure all local data blocks are removed?

As far as I understand, ipfs repo gc removes all blocks, except those that are pinned and/or added by ipfs files api (these are best-effort pinned, according comments on this and this)

However, even after unpinning all pins, and running ipfs files rm on all files, I still had this one cid locally - QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn.
I was able to verify that its present locally both by checking the output of ipfs refs local, and by checking the $IPFS_PATH/blocks for the base32 multihash of the cid - ciqftfeehedf6klbt32bfaglxezl4uwfnwm4lftlmxqbcerz6cmlx3y.

This cid seems to be the cid for an empty directory, and Iā€™m not sure how its not getting cleaned up by ipfs repo gcā€¦?

Because having nothing stored in MFS (files-api) is equivalent to having an empty folder.

So the CID for the empty folder is always there.

1 Like