How do I delete/refresh available kernels for IPython/Jupyter notebook v4.0?

I've recently stopped using macports so the kernel.json files I had for various IPython kernels are out of date. I have renamed ~/.ipython and removed ~/.jupyter but kernels launched are failing to start with file not found errors.

More tellingly, when I run jupyter-kernelspec list it still lists all the old kernels I had set up. Where is it getting this information from and what do I need to do to refresh/remove its cache?


Solution 1:

After a brute force search, Jupyter stores kernel info for OS X in /Users/${USER}/Library/Jupyter/kernels. This list got copied across from my .ipython/kernels list hence renaming it made no difference.

Removing /Users/${USER}/Library/Jupyter/kernels fixes the issue.

This is the reference I was looking for: http://jupyter-client.readthedocs.org/en/latest/kernels.html#kernelspecs

Solution 2:

This is an issue in Linux also if anyone else runs into it. Check the contents of: ~/.local/share/jupyter/kernels/