What is the best way to manage the content my node is hosting?
For example, a while ago for fun I pinned Stephen Hawkings thesis paper from 1966 to my node. Let’s say I no longer wish to pin this content, what is the easiest way for me to unpin it without actually knowing the original hash?
ipfs pin ls gives me a long list of hashes, but how do I know which one(s) are associated with what content, in order to unpin it with ipfs pin rm <hash of content to unpin>?
The mutable file system (ipfs files) is probably the best way to keep track of human-readable names and the corresponding hashes. This is also somewhat well-integrated into the web UI.
First, you’re almost certainly looking for only recursive top-level pinned hashes. You can limit the pin listing to those using ipfs pin ls --type=recursive.
To easily spit out the contents when looking for a particular file, you can do this using the following command. If you want you could also pipe this output into grep or dump it into a text file for searching.
ipfs pin ls --type=recursive -q | xargs -L 1 -I % sh -c 'echo; printf "Pinned hash: "; echo %; ipfs ls %'