# Turn off trash functionality

**URL:** <https://discourse.jupyter.org/t/turn-off-trash-functionality/30852>\
**Category:** Notebook\
**Created:** [December 11, 2024, 2:26pm UTC](https://discourse.jupyter.org/t/turn-off-trash-functionality/30852 "2024-12-11T14:26:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael-gvdw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/michael-gvdw/32/16324_2.png) [@michael-gvdw](https://discourse.jupyter.org/u/michael-gvdw)\
**Post date:** [December 11, 2024, 2:26pm UTC](https://discourse.jupyter.org/t/turn-off-trash-functionality/30852/1 "2024-12-11T14:26:58Z")

</div>

Hello,  
I am using kubeflow with jupyter notebooks. The image I am using is the following `kubeflownotebookswg/jupyter-tensorflow-full:v1.8.0`.

I want to set `c.FileContentsManager.delete_to_trash=False` in the `.jupyter/jupyter_notebook_config.py` file but I am not sure how I would be able to. I have tried createing a custom Docker image where I `COPY ./jupyter_notebook_config.py ~/.jupyter/jupyter_notebook_config.py` but this does not seem to work. Does anyone have any suggestions?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [December 11, 2024, 6:52pm UTC](https://discourse.jupyter.org/t/turn-off-trash-functionality/30852/2 "2024-12-11T18:52:29Z")

</div>

For modern Notebook versions (7.0+) you would be looking at saving configuration in `jupyter_server_config.py` not `jupyter_notebook_config.py`

---

<div class="post-metadata">

**Author:** ![michael-gvdw](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/michael-gvdw/32/16324_2.png) [@michael-gvdw](https://discourse.jupyter.org/u/michael-gvdw)\
**Post date:** [December 12, 2024, 9:02am UTC](https://discourse.jupyter.org/t/turn-off-trash-functionality/30852/3 "2024-12-12T09:02:21Z")

</div>

Hello @krassowski I noticed that the file is not present in my notebook. When I `ls .jupyter/` the `jupyter_server_config.py` file does not exist. Is there some step that would result in removing the files?

Or would I be able to add something like the following

```auto
# configure - jupyter
# NOTE: we use `--level=system` to write these configs at `/usr/local/etc/jupyter` because it defaults
## to `/opt/conda/etc/jupyter` and conda cleans that directory after every install
RUN jupyter labextension disable --level=system "@jupyterlab/apputils-extension:announcements" \
 && jupyter labextension lock --level=system "@jupyterlab/apputils-extension"

```

---

<div class="post-metadata">

**Author:** ![krassowski](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/krassowski/32/1685_2.png) [@krassowski](https://discourse.jupyter.org/u/krassowski)\
**Post date:** [December 12, 2024, 9:28am UTC](https://discourse.jupyter.org/t/turn-off-trash-functionality/30852/4 "2024-12-12T09:28:47Z")

</div>

It does not need to exist. There might be one in another location, see `jupyter --paths`. `jupyter server --generate-config` will create it. Please see [Configuring a Jupyter Server — Jupyter Server documentation](https://jupyter-server.readthedocs.io/en/latest/users/configuration.html) and [Migrating from Notebook Server — Jupyter Server documentation](https://jupyter-server.readthedocs.io/en/latest/operators/migrate-from-nbserver.html)

You can also pass traitlets in startup command like `--FileContentsManager.delete_to_trash=False` (or similar)
