Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove inactivate conda environment names from jupyter notebook? [duplicate]

I have created multiple miniconda environments in my macbook. But when I open jupyter notebook, it shows non-existent conda environments I created long ago and which are no longer available in conda environments.

How to remove these non-existing environment names from jupyter notebook?

My current conda list

enter image description here

What Jupyter Shows

(NOTE: For example, Jupyter notebook shows environment "xx" which is not in conda env list)

enter image description here

How to remove non-existent environments

How to remove non existing environment such as "xx" from showing up when I open jupyter notebook?

like image 950
BhishanPoudel Avatar asked Oct 21 '25 11:10

BhishanPoudel


1 Answers

It depends on how you registered the kernel, but I suspect you used the python -m ipykernel install --user. In that case, you should be able to get a list of where the kernels are registered with

jupyter kernelspec list

and you can simply delete the folders corresponding to kernels you wish to delete.

It may be worth noting that using nb_conda_kernels to auto-register all Conda envs with ipykernel would automatically remove kernels when you delete their environments or remove the ipykernel from the environment.

like image 92
merv Avatar answered Oct 23 '25 01:10

merv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!