Skip to main content

emptyBucket()

Removes all objects inside a single bucket.

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

Notes#

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

Examples#

Empty bucket#

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