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 Cell
s 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...