title | layout | nav_order |
---|---|---|
Clean up resources |
home |
90 |
{: .no_toc }
If you're not going to continue to use this lab environment, run the following command to delete the resource group along with all the resources created in this lab.
- TOC {:toc}
{: .note }
There is a known issue when delete OpenAI instance, Azd down on OpenAI instance, extra steps required to delete all the resources.
-
Prepare
-
Set config flag for OpenAI instance
azd config set alpha.deployment.stacks on
-
-
Tear down the azd environment
-
list all the azd environments
azd env list
-
run `` to clean up the target environment
azd down -e <env-name> --force --purge
-
-
Clean up the Azure Cognitive Services account
-
list the deployments
az cognitiveservices account deployment list -g $RESOURCE_GROUP -n $OPEN_AI_SERVICE_NAME -o table
-
delete the deployments one by one
az cognitiveservices account deployment delete -g $RESOURCE_GROUP -n $OPEN_AI_SERVICE_NAME --deployment-name gpt-4o az cognitiveservices account deployment delete -g $RESOURCE_GROUP -n $OPEN_AI_SERVICE_NAME --deployment-name text-embedding-ada-002
-
delete the Azure Cognitive Services account
az cognitiveservices account delete -g $RESOURCE_GROUP -n $OPEN_AI_SERVICE_NAME
-
-
Delete the resource group with all the resources
az group delete --name $RESOURCE_GROUP az configure --default group=''
{: .note }
It takes about 30 minutes to delete all the resources in the environment.