1
$\begingroup$

I am looking for a code I can paste at the beginning of a notebook to delete all the output cells so that when I execute the "Evaluate notebook" command, all the output cells are also cleared. As of now, I manually do "Cell > Delete All Output" before executing the "Evaluate notebook" command.

$\endgroup$
3
  • 1
    $\begingroup$ Possible duplicate of 16665, 13978 and perhaps several more. $\endgroup$
    – Syed
    Dec 10, 2022 at 11:14
  • 3
    $\begingroup$ FrontEndTokenExecute["DeleteGeneratedCells"] $\endgroup$ Dec 10, 2022 at 15:04
  • $\begingroup$ @DanielHuber, thanks for your reply. I liked the command you suggested and will use it henceforth. $\endgroup$
    – akr
    Dec 10, 2022 at 19:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.