In diesem Thema wird erläutert, wie Umgebungen in Apigee Hybrid gelöscht werden. Weitere Informationen finden Sie unter Umgebungen und Umgebungsgruppen.
So löschen Sie eine Umgebung
Angenommen, Sie haben zwei Umgebungen test und prod. Die Definitionen in der Überschreibungendatei könnten in etwa so aussehen:
Öffnen Sie die Überschreibungsdatei und entfernen Sie die prod-Umgebungsdefinition aus envs und virtualhosts. Behalten Sie nur die test-Definitionen bei. Beispiel:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eThis documentation explains the process for deleting environments within Apigee hybrid, using the example of deleting a "prod" environment.\u003c/p\u003e\n"],["\u003cp\u003eDeleting an environment requires first removing it from any associated environment groups using a \u003ccode\u003eDELETE\u003c/code\u003e request with the \u003ccode\u003ecurl\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eBefore fully removing the runtime components, a dry run should be executed using either \u003ccode\u003ehelm delete --dry-run\u003c/code\u003e or \u003ccode\u003e$APIGEECTL_HOME/apigeectl delete --dry-run=client\u003c/code\u003e to check for errors.\u003c/p\u003e\n"],["\u003cp\u003eAfter a successful dry run, the runtime components can be permanently removed using \u003ccode\u003ehelm delete ENV_NAME\u003c/code\u003e or \u003ccode\u003e$APIGEECTL_HOME/apigeectl delete\u003c/code\u003e, depending on your setup.\u003c/p\u003e\n"],["\u003cp\u003eThe final step involves manually removing the environment's definition from the overrides file, specifically from the \u003ccode\u003eenvs\u003c/code\u003e and \u003ccode\u003evirtualhosts\u003c/code\u003e sections.\u003c/p\u003e\n"]]],[],null,["# Delete environments\n\n| You are currently viewing version 1.11 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\n\nThis topic explains how to delete environments in Apigee hybrid. See also\n[About environments and environment groups](/apigee/docs/api-platform/fundamentals/environments-overview).\n\nHow to delete an environment\n----------------------------\n\nAssume that you have two environments, **test** and **prod**. In\nyour overrides file, the definitions might look something like this:\n\n```scdoc\n...\nenvs:\n - name: test\n serviceAccountPaths:\n synchronizer: \"your_keypath/synchronizer-manager-service-account.json\n udca: \"your_keypath/analytic-agent-service-account.json\n - name: prod\n serviceAccountPaths:\n synchronizer: \"your_keypath/synchronizer-manager-service-account.json\n udca: \"your_keypath/analytic-agent-service-account.json\n...\n```\n\nTo delete the **prod** environment, follow these steps:\n\n1. Get your gcloud authentication credentials: \n\n ```\n TOKEN=$(gcloud auth print-access-token)\n ```\n2. Delete the environment from any associated environment groups, one at a time: \n\n ```\n curl -X DELETE -H \"Authorization: Bearer $TOKEN\" \\\n \"https://apigee.googleapis.com/v1/organizations/$ORG_NAME/envgroups/$ENV_GROUP/attachments/prod\"\n ```\n3. Do a dry run to test removal of the runtime components:\n\n ### Helm\n\n ```\n helm delete ENV_NAME --dry-run\n ```\n\n The `--dry-run` command will return the same results as the command without the\n `--dry-run` option. For example: \n\n helm -n apigee delete example-env\n release \"example-env\" uninstalled\n\n ### `apigeectl`\n\n ```\n $APIGEECTL_HOME/apigeectl delete -f OVERRIDES_FILE.yaml --env ENV_NAME --dry-run=client\n ```\n4. If the dry run is error-free, remove the runtime components:\n\n ### Helm\n\n ```\n helm delete ENV_NAME\n ```\n\n ### `apigeectl`\n\n ```\n $APIGEECTL_HOME/apigeectl delete -f OVERRIDES_FILE.yaml --env ENV_NAME\n ```\n5. Open your overrides file and remove the `prod` environment definition from `envs` and `virtualhosts`, leaving only the **test** definitions. For example: \n\n ```scdoc\n ...\n envs:\n - name: test\n serviceAccountPaths:\n synchronizer: \"your_keypath/synchronizer-manager-service-account.json\n udca: \"your_keypath/analytic-agent-service-account.json\n ...\n ```\n6. Save the file."]]