Skip to content

Commit 23986a8

Browse files
authored
Merge pull request #220237 from lebaro-msft/patch-10
Add steps for deleting an added kernel
2 parents 575b318 + 335fd99 commit 23986a8

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

articles/machine-learning/how-to-access-terminal.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,40 @@ To add a new Jupyter kernel to the compute instance:
105105

106106
Any of the [available Jupyter Kernels](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels) can be installed.
107107

108+
### Remove added kernels
109+
> [!WARNING]
110+
> While customizing the compute instance, make sure you do not delete the **azureml_py36** or **azureml_py38** conda environments. Also do not delete **Python 3.6 - AzureML** or **Python 3.8 - AzureML** kernels. These are needed for Jupyter/JupyterLab functionality.
111+
112+
To remove an added Jupyter kernel from the compute instance, you must remove the kernelspec, and (optionally) the conda environment. You can also choose to keep the conda environment. You must remove the kernelspec, or your kernel will still be selectable and cause unexpected behavior.
113+
114+
To remove the kernelspec:
115+
1. Use the terminal window to list and find the kernelspec:
116+
117+
```shell
118+
jupyter kernelspec list
119+
```
120+
121+
1. Remove the kernelspec, replacing UNWANTED_KERNEL with the kernel you'd like to remove:
122+
123+
```shell
124+
jupyter kernelspec uninstall UNWANTED_KERNEL
125+
```
126+
127+
To also remove the conda environment:
128+
1. Use the terminal window to list and find the conda environment:
129+
130+
```shell
131+
conda env list
132+
```
133+
134+
3. Remove the conda environment, replacing ENV_NAME with the conda environment you'd like to remove:
135+
136+
```shell
137+
conda env remove -n ENV_NAME
138+
```
139+
140+
Upon refresh, the kernel list in your notebooks view should reflect the changes you have made.
141+
108142
## Manage terminal sessions
109143

110144
Select **View active sessions** in the terminal toolbar to see a list of all active terminal sessions. When there are no active sessions, this tab will be disabled.

0 commit comments

Comments
 (0)