You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
I want to clear some of the data stored in the browser by ipfs, preventing excessive data usage and causing possible exceptions. But the ipfs.repo.gc interface is not implemented, then I use ipfs.files.rm, but how do I change it?
For example, I want to delete QmZdXoMy8Gvis99qmGtHH4Q8YaUTwZrC5G7hRiLcMwrnVk and all leaf nodes, call ipfs.files.rm('/ipfs/QmZdXoMy8Gvis99qmGtHH4Q8YaUTwZrC5G7hRiLcMwrnVk', {recursive: true}) will report an error.
> await ipfs.files.rm('/ipfs/QmZdXoMy8Gvis99qmGtHH4Q8YaUTwZrC5G7hRiLcMwrnVk', {recursive: true})
rm.js:59 Uncaught (in promise) Error: /ipfs/QmZdXoMy8Gvis99qmGtHH4Q8YaUTwZrC5G7hRiLcMwrnVk does not exist Error: /ipfs/QmZdXoMy8Gvis99qmGtHH4Q8YaUTwZrC5G7hRiLcMwrnVk does not exist
at waterfall (rm.js:58)
at nextTask (waterfall.js:16)
at next (waterfall.js:23)
at onlyOnce.js:12
at toTrail (rm.js:52)
at reduce.js:10
at drain.js:20
at map.js:19
at filter.js:17
at map.js:19
The text was updated successfully, but these errors were encountered:
ipfs.files.rm operates on the Mutable File System (MFS). You cannot use it to delete an IPFS object by CID, like '/ipfs/QmZdXoMy8Gvis99qmGtHH4Q8YaUTwZrC5G7hRiLcMwrnVk'
Just to reiterate what @reasv said, files.rm is for removing files from your MFS tree not for removing blocks from your repo. Garbage collection is what you need for this and it is being worked on right now. You can follow progress here #2012
Type: Question
Severity: Low
Description:
I want to clear some of the data stored in the browser by ipfs, preventing excessive data usage and causing possible exceptions. But the
ipfs.repo.gc
interface is not implemented, then I useipfs.files.rm
, but how do I change it?For example, I want to delete
QmZdXoMy8Gvis99qmGtHH4Q8YaUTwZrC5G7hRiLcMwrnVk
and all leaf nodes, callipfs.files.rm('/ipfs/QmZdXoMy8Gvis99qmGtHH4Q8YaUTwZrC5G7hRiLcMwrnVk', {recursive: true})
will report an error.Steps to reproduce the error:
The text was updated successfully, but these errors were encountered: