Delete a bucket
Deletes an existing bucket. A bucket can't be deleted with existing objects inside it.
You must first empty()
the bucket.
- RLS policy permissions required:
buckets
table permissions:select
anddelete
objects
table permissions: none
- Refer to the Storage guide on how access control works
Parameters
- idREQUIREDstring
The unique identifier of the bucket you would like to delete.
const { data, error } = await supabase
.storage
.deleteBucket('avatars')