Dart Reference v2.0

Delete a bucket

Deletes an existing bucket. A bucket can't be deleted with existing objects inside it. You must first empty() the bucket.

  • Policy permissions required:
    • buckets permissions: select and delete
    • objects permissions: none
  • Refer to the Storage guide on how access control works
Parameters
    id
    REQUIRED
    String

    A unique identifier for the bucket you are deleting.


final String res = await supabase
  .storage
  .deleteBucket('avatars');