How to undeploy a Sanity hosted CMS after refactoring to Vercel
Perfect! The opposite of sanity deploy is sanity undeploy.
To remove your Sanity-hosted Studio, simply run this command from your Studio directory:
sanity undeployThis command will remove the hosted version of your Studio from Sanity's servers. The command reads the studio hostname from your sanity.cli.ts file to know which deployment to remove.
After running sanity undeploy, the Sanity-hosted URL (typically something like yourproject.sanity.studio) will no longer be accessible, which is exactly what you want since you've moved to a self-hosted setup on Vercel.
A few things to note:
- This only removes the hosted Studio - it doesn't affect your Content Lake, datasets, or any content
- Your Vercel-hosted version will continue working normally
- You can always redeploy later with
sanity deployif needed - If you have multiple studios in your project, make sure you're in the correct directory when running the command
Since you've already migrated to a monorepo on Vercel, running sanity undeploy is the clean way to remove the old hosted version and ensure clients only access your new Vercel-hosted Studio. Once undeployed, that studio name becomes publicly available again, and your local instances are not affected.
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.