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

jclay picture jclay · Mar 30, 2017 · Viewed 7.3k times · Source

I've added a bunch of files via ipfs add. How do I unpin and remove all of these at once?

Answer

jclay picture jclay · Mar 30, 2017

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