Skip to main content
The cpln delete command removes resources defined in YAML or JSON files, the inverse of cpln apply. Use the same manifest files to both create and tear down infrastructure.

When to use this

Tear down environments

Remove entire environments using the same manifests that created them

GitOps cleanup

Delete resources tracked in version control

Remove K8s conversions

Delete resources originally created from Kubernetes manifests

Batch deletion

Remove multiple related resources in one command

Basic usage

This deletes all resources defined in the file.

Options

Specify the GVC

Workloads, identities, and volumesets are scoped to a GVC. Specify it using one of these methods:
Pass the GVC with each command:
You can either specify the GVC in the manifest or via --gvc, but not both.

Delete Kubernetes conversions

Delete resources that were originally applied from Kubernetes manifests:
This converts the K8s manifest to Control Plane format, then deletes the corresponding resources.

Delete from stdin

Pipe resources from another command:

Multiple resources

Delete multiple resources from a single file using YAML document separators (---):
resources.yaml

Using the console

Delete resources via the console:
  1. Click cpln apply in the upper right corner
  2. Enable the Use as Delete switch
  3. Upload or paste your manifest
  4. Select the target org and GVC
  5. Click Delete

Common workflows

Tear down a complete environment

Remove a feature branch environment

Troubleshooting

The resource may have already been deleted or never existed. This is not an error - the command is idempotent.
For workloads, identities, and volumesets, specify the GVC:
Some resources can’t be deleted if other resources depend on them. Delete dependent resources first, or delete the GVC containing all resources.

Next steps

Apply YAML Manifests

Create resources from manifests

Convert K8s Manifests

Convert Kubernetes resources

Command Reference

Full delete command reference

CI/CD Usage

Automate deletions in pipelines