@textile/hub > Buckets > remove
Buckets.remove() method
Removes an entire bucket. Files and directories will be unpinned (cannot be undone).
Signature:
remove(key: string): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Unique (IPNS compatible) identifier key for a bucket. |
Returns:
Promise<void>
Example
Remove a Bucket
import { Buckets } from '@textile/hub'
const remove = async (buckets: Buckets, key: string) => {
buckets.remove(key)
}