offchain_localStorageClear - Bittensor RPC Method
Clear an offchain local storage key on the node. Administrative method, not available on public RPC.
Removes a key from the node's offchain local storage. Offchain local storage is a node-local key-value store used by offchain workers and is not shared across the network or stored on-chain. This is an administrative method that requires the node to be running with --rpc-methods unsafe and is not available on public shared RPC endpoints.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | Storage kind: "PERSISTENT" (survives restarts) or "LOCAL" (cleared on restart). |
key | string | Yes | Hex-encoded key to remove from offchain storage. |
Response
| Field | Type | Description |
|---|---|---|
result | null | Confirms the key has been cleared (or was already absent). |
Code Examples
Response Body
ResponseUse Cases
- Offchain worker reset -- Clear cached or stale offchain data that an offchain worker relies on, forcing it to re-fetch from external sources.
- Development and testing -- Reset offchain state during development or debugging of offchain worker logic.
- Storage cleanup -- Remove obsolete entries from offchain storage on a self-hosted Bittensor node.
Notes
- This is an unsafe/administrative method. It is disabled on public RPC endpoints including Dwellir's shared Bittensor nodes.
- Offchain storage is local to each node and is not part of the blockchain state.
- The
PERSISTENTkind survives node restarts;LOCALkind is cleared when the node restarts.
Related Methods
offchain_localStorageGet-- Read a value from offchain local storageoffchain_localStorageSet-- Write a value to offchain local storage