Is it possible to completely delete file from the Cluster?

I have a Private IPFS Network and IPFS-CLuster.

I thought if I control all peers and just unpin some file by it’s CID from all peers than file will be deleted from the network. But I was wrong…

Using Cluster API :
- added file (ipfs-cluster-ctl add file.txt)
- check it status and it was pinned among all nodes (ipfs-cluster-ctl status CID)
- unpinned recently added file (ipfs-cluster-ctl pin rm CID)
- checked that it was unpinned (ipfs-cluster-ctl pin ls)

But I’m still able to get the file with ipfs cat/get CID…
Even if I run garbage collector on all nodes ipfs repo gc I’m still able to access this file.

Is it possible to completely delete file from my Private Network/Cluster?

I’m guessing that you need to GC it and not just unpin it.

That is weird. GCing should have removed it completely. Does ipfs-cluster-ctl status CID show it as unpinned? Does ipfs pin ls <cid> comes back empty in all ipfs peers?

You need to make sure that the file is not indirectly pinned by any other pin as well.

Hi Hector, can you please clarify what do you mean “indirectly”?

That’s what I have:

Step 1 Node0
Add file with ipfs-cluster-ctl

Step 2 Node1
Check status on the second node

Step3 Node1
Cat file with ipfs

Step 4 Node0
Remove/Unpin file with ipfs-cluster-ctl

Step 5 Node0/Node1
Cat file with ipfs

Step 6 Node0/Node1
Run GC with ipfs repo gc

Node0

Node1

Step 7 Node0/Node1
Cat file with ipfs

Node0

Node1

The problem is that garbage collection does not seem to be working on one of your peers, so the file is not garbage collected. You should investigate the gc error.

Ok, I’ll do more tests and come back.

By the way, In order not to join each peer separately is it possible to run GC on all peers with IPFS-Cluster?

No, but we could easily support it. Can you open an issue in the cluster repository?

Yes, It works.

I redeployed my network and was able to remove file with ipfs-cluster-ctl pin rm CID + ipfs repo gc

Also I opened an Issue regarding ability to run GC with IPFS-Cluster API

Thanks!