I've added a bunch of files via ipfs add
. How do I unpin and remove all of these at once?
IPFS does allows you to delete file, you just need to make so on all different nodes hosting the file.
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
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.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With