Home

Delete files in a bucket

Deletes files within the same bucket

  • RLS policy permissions required:
    • buckets table permissions: none
    • objects table permissions: delete and select
  • Refer to the Storage guide on how access control works
Parameters
  • paths
    REQUIRED
    string[]

    An array of files to delete, including the path and file name. For example [`'folder/image.png'`].


const { data, error } = await supabase
  .storage
  .from('avatars')
  .remove(['folder/avatar1.png'])
Need some help?

Not to worry, our specialist engineers are here to help. Submit a support ticket through the Dashboard.