6
$\begingroup$

I have a very large notebook that has evolved over years. It is the result of countless copy and paste, edit, divide, merge, etc., operations. Some of the cells have hundreds (thousands?) of elements in the CellChangeTimes list.

Is there a way to clear those? That is, without editing each cell by hand.

$\endgroup$
3
  • 2
    $\begingroup$ You can try the "Clear history" button described here $\endgroup$
    – Jason B.
    Apr 26, 2018 at 21:33
  • $\begingroup$ It took a while to open the dialog, but it worked. If you turn your comment into an answer, I will be happy to accept it. $\endgroup$ Apr 26, 2018 at 21:43
  • 2
    $\begingroup$ Years ago I had the same problem with a notebook of a customer and it was really slow to open.Since then I always switch off history tracking globally. This actually should be the default setting in Mathematica always. But I doubt WRI will change that... $\endgroup$ Apr 27, 2018 at 7:18

2 Answers 2

4
$\begingroup$

For a programmatic approach, this should work:

CurrentValue[Cells[], CellChangeTimes] = Inherited;

Then you may want to stop them being created:

CurrentValue[EvaluationNotebook[], "TrackCellChangeTimes"] = False;
$\endgroup$
2
$\begingroup$

(Posting comment by Jason B. as an answer.)

You can use the "Clear history" button in the Notebook history palette.

$\endgroup$
1
  • $\begingroup$ I just found myself googling "clear notebook history mathematica" and came here..... $\endgroup$
    – Jason B.
    Jun 15, 2021 at 18:05

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.