Is there a way to clean all the notebook without closing it and opening another one?
Thanks!
Is there a way to clean all the notebook without closing it and opening another one?
Thanks!
Do you want to remove all the cells in the notebook?
Edit > Select All
Then Delete
Yeah buddy, thanks
Programmatic solutions can be found in this thread: “How can I clear the content of my notebook in Mathematica?”
Alexey, thanks for pointing the cross-post out. Because it is on hold and can be closed in future we are riposting explicitly the answers.
Alexey Popkov
This is very efficient for large Notebooks:
NotebookPut[Notebook[{}], EvaluationNotebook[]];
(simple replacement of the evaluation notebook with blank notebook).
I have tested this method with a Notebook of size 976 Mb containing 36031 Cells and it was cleared out in no time, while the NotebookDelete[Cells[]] method seems to take forever for this Notebook!
Mr.Wizard
This will delete everything in the evaluation Notebook:
NotebookDelete[Cells[]]
This will generate a Palette Button that deletes everything is the selected Notebook:
CreatePalette @ Button["Clear Notebook", NotebookDelete @ Cells @ InputNotebook[]]
As noted in the comments it is probably just as fast, if not faster, to simply Select All and Clear (Ctrl+A and Delete in Windows).
leosenko
If you mean screen, then ctrl + A to select all cells and then hit del. If you mean memory, then ClearAll["Global`*"] if it does not help, restart…
Ctrl+A and DEL (or Backspace) works for me (in Windows). I am using the Wolfram Cloud. I also do Evaluation->ResetSession to reset the cell output numbers.