Empty a bucket
Removes all objects inside a single bucket.
- RLS policy permissions required:
buckets
table permissions:select
objects
table permissions:select
anddelete
- Refer to the Storage guide on how access control works
Parameters
- idREQUIREDstring
The unique identifier of the bucket you would like to empty.
const { data, error } = await supabase
.storage
.emptyBucket('avatars')