Supported versions:
Unsupported versions:
This topic explains how to delete environments in Apigee hybrid. See also About environments and environment groups.
Assume that you have two environments, test and prod. In your overrides file, the definitions might look something like this:
... envs: - name: test serviceAccountPaths: synchronizer: "your_keypath/synchronizer-manager-service-account.json udca: "your_keypath/analytic-agent-service-account.json - name: prod serviceAccountPaths: synchronizer: "your_keypath/synchronizer-manager-service-account.json udca: "your_keypath/analytic-agent-service-account.json ...
To delete the prod environment, follow these steps:
TOKEN=$(gcloud auth print-access-token)
curl -X DELETE -H "Authorization: Bearer $TOKEN" \ "https://apigee.googleapis.com/v1/organizations/$ORG_NAME/envgroups/$ENV_GROUP/attachments/prod"
apigeectl delete -f overrides.yaml --env=prod --dry-run=true
apigeectl delete -f overrides.yaml --env=prod
curl -X DELETE -H "Authorization: Bearer $TOKEN" \ "https://apigee.googleapis.com/v1/organizations/$ORG_NAME/environments/prod"
prod environment definition from
envs and virtualhosts, leaving only the test definitions. For
example:
...
envs:
- name: test
serviceAccountPaths:
synchronizer: "your_keypath/synchronizer-manager-service-account.json
udca: "your_keypath/analytic-agent-service-account.json
...Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-09 UTC.