Is there a way to clean all the notebook without closing it and opening another one?
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.
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.
This is very efficient for large Notebooks:
(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!
This will delete everything in the evaluation Notebook:
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).
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...
Do you want to remove all the cells in the notebook?
Edit > Select All
Yeah buddy, thanks