Dart Reference v2.0

Empty a bucket

Removes all objects inside a single bucket.

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

    A unique identifier for the bucket you are emptying.


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