Undeploy CLI command reference

Removes the deployed studio from <your-studio-name>.sanity.studio.

USAGE
  $ sanity undeploy [APPID] [--json] [--yes] [--dry-run]

ARGUMENTS
  [APPID]  ID of the application to undeploy. Overrides `deployment.appId` in sanity.cli.ts

FLAGS
  -j, --json     Output the result as JSON
  -y, --yes      Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
      --dry-run  Report what would be undeployed without deleting anything

DESCRIPTION
  Removes the deployed Sanity Studio/App from Sanity hosting

EXAMPLES
  Undeploy the studio or application after confirming

    $ sanity undeploy

  Undeploy the studio or application with the given ID

    $ sanity undeploy abc123

  Report what would be undeployed without deleting anything

    $ sanity undeploy --dry-run

  Undeploy without prompting and report the result as JSON

    $ sanity undeploy --json --yes

The undeploy command reads the studio host name from the sanity.cli.ts file in your studio directory. To enable support for deploying/undeploying multiple instances, follow the CI/CD instructions in the deployment guide.

Once a studio is undeployed, the name (e.g., <your-studio-name>) becomes publicly available. Local instances of the studio are not affected.

Was this page helpful?

sanity.ioAll Systems Operational© Sanity 2026
Change site theme