© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•6mo ago•
3 replies
m.

Storage: delete user folder using edge functions

Hey,

I've followed this article to implement an edge function allowing users to self-delete their accounts - https://blog.mansueli.com/supabase-user-self-deletion-empower-users-with-edge-functions

However, I've noticed that in this example, when deleting the user files from storage, we need to build a list of urls first and then delete them.

Assuming that each user in my project has his own separate folder inside the storage bucket (named with his userId), is it possible to just remove the whole folder at once? (like we would do it in the dashboard). If not, then how to make sure that ALL of the files are deleted? I've seen that there are some limits to how many urls we can retrieve.

Thanks in advance
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Delete Folder in Storage
SupabaseSSupabase / help-and-questions
4y ago
Deploying Edge Functions Shared Folder
SupabaseSSupabase / help-and-questions
8mo ago
Edge Function Delete User
SupabaseSSupabase / help-and-questions
4y ago
Testing Edge Functions as a user
SupabaseSSupabase / help-and-questions
5d ago