# Jupyterlab save notebook without cells output

**URL:** <https://discourse.jupyter.org/t/jupyterlab-save-notebook-without-cells-output/24535>\
**Category:** JupyterLab\
**Tags:** jupyterlab, how-to\
**Created:** [March 15, 2024, 7:47am UTC](https://discourse.jupyter.org/t/jupyterlab-save-notebook-without-cells-output/24535 "2024-03-15T07:47:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr\_goyal](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@mr\_goyal](https://discourse.jupyter.org/u/mr_goyal)\
**Post date:** [March 15, 2024, 7:47am UTC](https://discourse.jupyter.org/t/jupyterlab-save-notebook-without-cells-output/24535/1 "2024-03-15T07:47:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![blakete](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/blakete/32/15709_2.png) [@blakete](https://discourse.jupyter.org/u/blakete)\
**Post date:** [October 31, 2024, 9:28pm UTC](https://discourse.jupyter.org/t/jupyterlab-save-notebook-without-cells-output/24535/2 "2024-10-31T21:28:47Z")

</div>

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!
