Delete / Unpin Content
Remove a pin by its CID. Once unpinned, the content is no longer stored by Pinner and may become unavailable on the IPFS network.
Unpin a single CID
pinner pins rm bafybeig... --forceimport { Pinner } from "@lumeweb/pinner";
const pinner = new Pinner({ jwt: process.env.PINNER_AUTH_TOKEN! });
await pinner.unpin("bafybeig...");The CLI prints Unpinned CID: <cid> on success. The SDK method resolves when the pin is removed.
Without --force, the CLI prompts for confirmation:
pinner pins rm bafybeig...
# → "Are you sure you want to unpin bafybeig...?"Unpin multiple CIDs
Remove several pins in one command. The CLI accepts space-separated CIDs.
pinner pins rm bafybeig...abc bafybeig...def --force --parallel 5import { Pinner } from "@lumeweb/pinner";
const pinner = new Pinner({ jwt: process.env.PINNER_AUTH_TOKEN! });
const cids = ["bafybeig...abc", "bafybeig...def"];
for (const cid of cids) {
await pinner.unpin(cid);
console.log(`Unpinned ${cid}`);
}The CLI's --parallel flag controls how many unpin operations run concurrently. --continue keeps going even if some operations fail; for example:
pinner pins rm cid1 cid2 cid3 --force --parallel 3 --continueUnpin from a file
Read CIDs from a text file (one per line):
pinner pins rm --file cids-to-remove.txt --forceUnpin by request ID
If you have a pin request ID instead of a CID (for example, from a failed upload), remove it by request ID:
await pinner.unpinByRequestId("request-id-here");The CLI does not expose request IDs directly; use pinner pins ls to find the CID, then unpin by CID.
Unpin all pins
Remove every pin at once. Requires --force for safety.
pinner pins rm --all --forceCombine with --status to unpin only pins in a specific state: for example, remove all failed pins:
pinner pins rm --all --status failed --forceDry run
Preview what would be removed without making any changes:
pinner pins rm bafybeig... --dry-runThe CLI prints the operations it would perform, including the endpoint and CIDs, but does not actually unpin anything.