Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jupyter kernelspec remove JupyterApp.answer_yes=True or -y options ignored. #658

Closed
mforbes opened this issue Jun 13, 2021 · 1 comment · Fixed by #659
Closed

jupyter kernelspec remove JupyterApp.answer_yes=True or -y options ignored. #658

mforbes opened this issue Jun 13, 2021 · 1 comment · Fixed by #659

Comments

@mforbes
Copy link

mforbes commented Jun 13, 2021

When trying to remove a kernel from a script, I need to specify the -y or --JupyterApp.answer_yes=True option so that the script does not require user intervention, however, this seems to be ignored.

$ jupyter kernelspec --version
6.2.0
$ jupyter kernelspec remove --help
...
-f
    Force removal, don't prompt for confirmation.
    Equivalent to: [--RemoveKernelSpec.force=True]
...
-y
    Answer yes to any questions instead of prompting.
    Equivalent to: [--JupyterApp.answer_yes=True]
...
$ jupyter kernelspec remove -y mykernel
Kernel specs to remove:
  mykernel            	/home/user/.local/share/jupyter/kernels/mykernel
Remove 1 kernel specs [y/N]: 

The workaround is easy: use the -f option, but the documentation is quite misleading since a question is asked, but -y does not answer yes.

$ jupyter kernelspec remove -f mykernel
[RemoveKernelSpec] Removed /home/user/.local/share/jupyter/kernels/mykernel
@davidbrochart
Copy link
Member

Thanks for reporting @mforbes, #659 should fix the issue. Could you please confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants