Zuplo CLI

Zuplo CLI: Delete

Applies to
Gatewayruntime for API, AI, and MCP gateways
Hosting
Managed EdgeManaged DedicatedSelf-HostedDiffers
1 difference by hosting option
Self-Hosted

To delete a deployment on your own cluster, pass your cluster's management API endpoint with --self-hosted-endpoint. See Self-Hosted requirements.

Deletes a deployed Zuplo environment by URL or branch name
Code
zuplo delete (--url <url> | --branch <branch>) [options]

Common use cases

The following examples assume that you are passing in your --api-key either as an argument or through the ZUPLO_API_KEY environment variable.

Deleting an environment by branch

Pass the same branch name that you gave to zuplo deploy --branch. The CLI finds the environment that the branch deployed in the project and deletes it, so you don't have to capture the environment URL.

TerminalCode
zuplo delete --project my-project --branch my-feature

If no environment exists for the branch, the command reports that none was found and exits without an error. This makes it safe to run in a cleanup step that can fire more than once.

Deleting an environment by URL

TerminalCode
zuplo delete --url https://my-api-dev-123abc.zuplo.app

Choosing between --url and --branch

Pass exactly one of --url or --branch. The command fails if you pass both, and fails if you pass neither.

The CLI reads --branch only when you type it on the command line. An exported ZUPLO_BRANCH environment variable is ignored by zuplo delete, so a variable that a CI job exports for other commands can't choose the environment you delete. zuplo deploy ignores ZUPLO_BRANCH the same way.

Deleting a pull request preview in CI

When a pull request closes, delete the environment that the pull request deployed, using the same branch name that the deploy step used.

TerminalCode
zuplo delete --project my-project --branch "$BRANCH_NAME"

Examples

Delete a deployed environment by its URL

Code
zuplo delete --url https://my-api-dev-123abc.zuplo.app

Delete the environment deployed from the my-feature branch

Code
zuplo delete --branch my-feature

Delete an environment and wait until the deletion is complete

Code
zuplo delete --url https://my-api-dev-123abc.zuplo.app --wait

Options

--url

The URL of the Zuplo API to delete

Type: string

--branch

The branch name of the environment to delete (the value passed to `zuplo deploy --branch`)

Type: string

--project

The project name

Type: string

--account

The account name

Type: string

--self-hosted-endpoint

The endpoint of your self-hosted service to deploy to

Type: string

--wait

Should the CLI wait until the Zuplo API is deleted

Type: boolean

Global options

The following global options are available for all commands:

Additional resources

Last modified on