Storage blocked (402 Payment Required) - orphaned S3 files from direct SQL deletes
edge functions
My project is completely blocked due to storage quota exceeded (402 Payment Required). I can't even load the Storage buckets in the dashboard to manually delete files. Root cause
I had a pg_cron job that deleted files directly from
storage.objects
storage.objects
via SQL:
DELETE FROM storage.objects WHERE bucket_id = 'images' AND created_at < NOW() - INTERVAL '24 hours';
DELETE FROM storage.objects WHERE bucket_id = 'images' AND created_at < NOW() - INTERVAL '24 hours';
I now understand this only removes metadata but leaves the actual S3 files orphaned, still counting towards my quota.
Request
1. Could you please clean up the orphaned S3 files that are no longer in storage.objects? 2. Or temporarily lift the restriction so I can delete files properly via the Storage API?
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.