Jupyterlab save notebook without cells output

Hi team,

When saving ipynb files in jupyterlab, code cells with their output is also getting saved.
What i want is to save only code cells not their output.

I searched little bit and found we can implement pre_save_hook but didnt found where we have to implement it. Can anyone guide me on that? or there is anyother way to do it?

Open your notebook, select “Edit”>“Clear Outputs of All Cells”, and then “File”>“Download” your notebook. If you do not want to clear your outputs in the notebook, duplicate the notebook, follow that same procedure, and then delete the duplicate. Hope this solves your problem!