deleteBucket()
Deletes an existing bucket. A bucket can't be deleted with existing objects inside it.
You must first empty()
the bucket.
const { data, error } = await supabase
.storage
.deleteBucket('avatars')
Parameters
idrequired
string
The unique identifier of the bucket you would like to delete.
Notes
- Policy permissions required:
buckets
permissions:select
anddelete
objects
permissions: none
Examples
Delete bucket
const { data, error } = await supabase
.storage
.deleteBucket('avatars')