# Delete all variables - Pluto notebook - Julia

**URL:** <https://discourse.julialang.org/t/delete-all-variables-pluto-notebook-julia/93245>\
**Category:** General Usage\
**Tags:** question, pluto\
**Created:** [January 20, 2023, 2:21am UTC](https://discourse.julialang.org/t/delete-all-variables-pluto-notebook-julia/93245 "2023-01-20T02:21:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Students](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/students/32/46015_2.png) [@Students](https://discourse.julialang.org/u/Students)\
**Post date:** [January 20, 2023, 2:21am UTC](https://discourse.julialang.org/t/delete-all-variables-pluto-notebook-julia/93245/1 "2023-01-20T02:21:24Z")

</div>

Hello,

I want to clear all the variables defined before by running a cell in pluto notebook.  
I am new here! Thanks for the help

Thank you!

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [January 20, 2023, 5:18am UTC](https://discourse.julialang.org/t/delete-all-variables-pluto-notebook-julia/93245/2 "2023-01-20T05:18:09Z")

</div>

You cannot really clear variables in Julia at the moment. The best you could do is set them to `nothing`.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [January 20, 2023, 4:24pm UTC](https://discourse.julialang.org/t/delete-all-variables-pluto-notebook-julia/93245/3 "2023-01-20T16:24:38Z")

</div>

Although specifically in a Pluto context this won’t work:

```julia
x = rand(5)

```

in one cell and

```julia
x = nothing

```

in another cell will error out with a `multiple definitions` error, which is of course expected and desired in Pluto’s reactive programming model.

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [January 20, 2023, 5:31pm UTC](https://discourse.julialang.org/t/delete-all-variables-pluto-notebook-julia/93245/4 "2023-01-20T17:31:39Z")

</div>

I am sort of guessing here but perhaps you are worried about “hidden state” which is a problem in Jupyter notebooks, but is not a problem in Pluto notebooks.

In Pluto, you could delete/comment the cells with the variables and save the notebook and find that they no longer exist.

---

<div class="post-metadata">

**Author:** ![Students](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/students/32/46015_2.png) [@Students](https://discourse.julialang.org/u/Students)\
**Post date:** [January 22, 2023, 3:01am UTC](https://discourse.julialang.org/t/delete-all-variables-pluto-notebook-julia/93245/5 "2023-01-22T03:01:58Z")

</div>

Got it. Thanks for the response

---

<div class="post-metadata">

**Author:** ![Students](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/students/32/46015_2.png) [@Students](https://discourse.julialang.org/u/Students)\
**Post date:** [January 22, 2023, 3:02am UTC](https://discourse.julialang.org/t/delete-all-variables-pluto-notebook-julia/93245/6 "2023-01-22T03:02:39Z")

</div>

I will check it out  
Thanks for the response

---

<div class="post-metadata">

**Author:** ![Students](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/students/32/46015_2.png) [@Students](https://discourse.julialang.org/u/Students)\
**Post date:** [January 22, 2023, 3:03am UTC](https://discourse.julialang.org/t/delete-all-variables-pluto-notebook-julia/93245/7 "2023-01-22T03:03:31Z")

</div>

Ohh cool.  
Thanks for the information. I can use this
