Skip to main content

deleteBucket()

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

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

Notes

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

Examples

Delete bucket

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