On 1 December 2026 Supabase shipped Object Versioning and Lifecycle Policies for Storage, both as a public alpha. With versioning on, a bucket keeps the previous copy when a file is overwritten and adds a delete marker instead of deleting. Any project can turn it on. Nothing changes for buckets where you don't.
For a lot of AI-built apps that's good news. Upload code for avatars, logos and generated PDFs often calls upload(path, file, { upsert: true }), and until now that overwrote the old file for good. So did a remove() from a buggy admin screen. Versioning gives you an undo. It also gives you three things to check first.
You turn it on per bucket in code. The changelog's example is supabase.storage.updateBucket('avatars', { public: false, versioningStatus: 'ENABLED' }). In supabase-js, updateBucket requires public, so read the current value with getBucket and pass it back, or you may flip a bucket's visibility by accident. The statuses are DISABLED, ENABLED and SUSPENDED, and once a bucket leaves DISABLED it can't go back.
After that, an upload with upsert: true to an existing path keeps the earlier copy as a noncurrent version. A delete without a version ID adds a delete marker, so reads return NoSuchKey, but the file can be restored. A delete with a version ID removes that version permanently. Every version has a versionId, and download, info, createSignedUrl and getPublicUrl accept one.
Restoring is a move with sourceVersionId onto the original path. The restored file becomes the current version with a new ID, and the source version is deleted. To undo a delete, you remove the delete marker by its version ID. The Dashboard can list, restore and permanently delete versions too.
This is the part that matters for user data. Supabase's docs say policies on storage.objects apply to every version. If your select policy says a user can read files in their own folder, they can now read every old version of every file in that folder as well.
Usually that's harmless. It isn't when a user replaces a file because they wanted the old one gone: a profile photo, an uploaded ID, a contract with the wrong details. And if your policies are already too loose (say, a policy that lets any signed-in user read the whole bucket), versioning quietly widens the leak to everything that was ever uploaded after you enabled it. If that sounds like your app, our page on users who can read each other's data is the place to start.
The docs give the fix: add archived_at is null to the select policy to limit reads to current versions. The trade-off is that users can then no longer restore a version themselves with copy or move, so restores go through a server route or the Dashboard. Your delete policy governs deletes with and without a version ID, so check that a user who may delete their file may also permanently delete its history, or not.
Kept versions count toward Storage usage. An avatar bucket that gets rewritten on every profile save will grow. A lifecycle policy keeps that in check: per bucket, you set noncurrentDays (how long a version must be noncurrent before it expires) and optionally newerNoncurrentVersions (1 to 100 of the newest to keep regardless of age). Supabase applies rules about once a day, and expired versions are gone for good. Note that updateBucketLifecycle replaces the whole policy, so any rule you leave out is removed. Prefix and tag filters aren't supported yet: a rule covers the whole bucket.
A few more things from the docs worth knowing before you rely on this:
SUSPENDED bucket, an upload or delete replaces the version written while versioning was off, even if it's noncurrent. Writing to a file that existed before versioning was enabled replaces that original permanently.emptyBucket deletes everything, every version and delete marker included, and adds no delete markers. It can't be undone.NotSupported. Use supabase-js, the Storage API or the Dashboard for version work.
Before you flip versioningStatus on a bucket that holds user files, open its select policy on storage.objects and decide whether users should see old versions. If not, add archived_at is null first, then enable versioning, then set a lifecycle rule so the history doesn't grow forever. If you can't tell what your current Storage policies actually allow, that's worth finding out whether or not you turn versioning on.
First published on RescueMySites.