Understanding what I'm seeing when garbage collecting

When I run ‘ipfs repo gc’, I see lots and lots of hashes listed. I have maybe three or four added items. What are all those hashes as a result of gc?

What command did you use to add items to your node?

To answer your question in general, the hashes listed as a result of ipfs repo gc are hashes that were cached – but not pinned – on your node.

Probably the chunks of the items you added. When you add a file, we chunk it into smaller pieces (makes it easier to transfer it and allows one to download pieces of a file without needing the entire thing).

Thanks. I used ipfs add
As I understand it the add command automatically pins the added file. Isn’t that so? If so, then all files added were pinned.

1 Like

I looked at some of the gc’ed hashes in the web interface and they were from different countries.

I wasn’t sure of the default behavior when I wrote my post, but you’re right that the default is to pin the added hash.

1 Like

You’re right, they should be.

Interesting. Are you running a public gateway? Also, are you sure you haven’t downloaded anything through IPFS?

Afraid I’ve lost track. I may have downloaded the cat.jpg or done other things in the tutorials. However, I have run gc several times (just now again in fact) and I get a long list of hashes–some of which I copy and paste into the DAG page of the webui, and I see one for instance under Objects:
This object has no links

Object data (3110 bytes)
It begins as follows:
{“type”:“Leaf”,“data”:[{“min”:1135680000,“data”:[“United States”,“US”, …
If I scroll to the right is goes on and on.

For the record, I connect both at work and at home if that makes a difference.

Ah, that’s the data we use to generate that pretty globe on the webui. I believe those nodes are generated by https://github.com/ipfs/ipfs-geoip (which will run locally in the webui).

2 Likes