JavaScript: Empty a bucket | Supabase Docs (original) (raw)

Removes all objects inside a single bucket.

Parameters

(Required)
The unique identifier of the bucket you would like to empty.

Examples

Empty bucket

const { data, error } = await supabase
  .storage
  .emptyBucket('avatars')