To clear the notebook from the commandline, first make sure that you've installed
nbstripout in the correct virtualenv. You can do this in the terminal via;
pip install nbstripout
Once this is installed (and assuming a notebook called
you can strip the output from the file by running;
There are some features we haven't discussed here, but you can find more information on the github page of the project.