How may I delete an environment from azure machine learning workspace? I can create and list them but could not figure out how I may delete them?
-
Do you want to remove the environment metadata from the registry or remove the underlying docker images that are created on the ACR? – Ram Aug 18 '20 at 03:11
4 Answers
If you want to remove the listed item in the Environments tab of your Azure ML Studio, you can try the following command with your Azure CLI
az ml environment delete -n <environment_name> -g <Resource-group name> -w <Workspace name> -v <version of the environment>

- 43
- 6
Environments are versioned however, so you could just register over it with the new definition for now to "erase" consumers picking up the old one by default as a workaround (if you just wanted to reuse the name).
If you're interested in shortening the list of returned values, might be easier to use ws.environments["mysecondenv"] instead

- 2,459
- 1
- 7
- 14
Currently, Environments cannot be deleted from the GUI.
Here's what worked for me:
- From the CMD prompt, launch Azure CLI
az login
- Once you verify your subscription/ RG/ Workspace, list the available Environments using the command
az ml environment list
- Before deleting, it is a good practice to list the environment:
az ml environment list --name name-of-your-env
- Once the enviornment is confirmed, you can delete it by using the command
az ml environment archive --name name-of-your-env
Please note there wont be any output generated if the deletion/ archiving process is successful.
Instead of delete
, the archive
command seems to work. For more info here

- 1,600
- 1
- 20
- 30
You probably mean un-registering an environment because the environment itself dose not exist under your workspace, unless you build a container with this specific environment.
The answer is currently no. See here: https://github.com/Azure/MachineLearningNotebooks/issues/1201
Same is with experiments and I thinks models as well. Makes sense to me actually because you track them all together.

- 420
- 5
- 8