Skip to main content
Version: v1-dev

deleteBucket()

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

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

Notes

  • Policy permissions required:
    • buckets permissions: select and delete
    • objects permissions: none

Examples

Delete bucket

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