How do I unpin and remove all IPFS content from my machine?

Additionally to jclay's answer, you might also want to delete everything on MFS:

ipfs files ls / | while read f; do ipfs files rm -r "/$f"; done

(Obligatory warning that this won't work if paths contain newlines.)


to unpin all added content:

ipfs pin ls --type recursive | cut -d' ' -f1 | xargs -n1 ipfs pin rm

then optionally run storage garbage collection to actually remove things:

ipfs repo gc

Tags:

Ipfs