# Pluto Notebook namespace goes stale and packages go missing

**URL:** <https://discourse.julialang.org/t/pluto-notebook-namespace-goes-stale-and-packages-go-missing/130903>\
**Category:** Pluto\
**Tags:** question\
**Created:** [July 21, 2025, 11:43am UTC](https://discourse.julialang.org/t/pluto-notebook-namespace-goes-stale-and-packages-go-missing/130903 "2025-07-21T11:43:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdawg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cdawg/32/9811_2.png) [@cdawg](https://discourse.julialang.org/u/cdawg)\
**Post date:** [July 21, 2025, 11:43am UTC](https://discourse.julialang.org/t/pluto-notebook-namespace-goes-stale-and-packages-go-missing/130903/1 "2025-07-21T11:43:09Z")

</div>

I have a difficult bug that only appears after some amount of time has passed. A long running notebook is left open and working for several days everything is fine. Then at some point I open my laptop and most, (not all) using modules are missing from the namespace.

e.g. UndefVarError: `CairoMakie` not defined

If I rerun the package management cell, the packages give the error of the form:  
“The package **Clustering.jl** could not load because it failed to initialize.”

The only solution is to kill the process and reopen the notebook, where everything will run fine again.

It has been easier to just restart the notebook than figure out what is going on, but just wondering if there has been anyone else seeing this.

My versions are as follows but I will also try updating these to see if it fixes the problem. (Edit: Part of the difficulty is I can’t know if it fixes the problem for a few days or weeks. 🤪)

Julia 1.10.5  
Pluto v0.20.10

Let me know if it looks familiar. Thanks very much.

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [July 21, 2025, 3:50pm UTC](https://discourse.julialang.org/t/pluto-notebook-namespace-goes-stale-and-packages-go-missing/130903/2 "2025-07-21T15:50:40Z")

</div>

> <https://github.com/fonsp/Pluto.jl/issues/2641>
>
> If a notebook is left running for a really long time, the temporary folder stori…ng its environment can get cleaned up by the system.
> 
> This leaves the notebook in a broken state, but it will manifest in unusual ways, such as by UndefVarErrors due to missing packages that should have been loaded.
> 
> It would be helpful if Pluto could detect if the environment folder has been deleted and require the notebook to be restarted.

> <https://github.com/fonsp/Pluto.jl/issues/3139>
>
> After a notebook has been open for some time (days/weeks), I cannot execute code… there anymore. It throws all kind of errors "XXX is not defined" where XXX is any symbol from a loaded package.
> 
> I think it happens because (pre)compilation cache gets cleaned up by Julia: it has some limit I guess. Would be nice if Pluto somehow forced it to keep the cache for open notebooks intact...

---

<div class="post-metadata">

**Author:** ![cdawg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cdawg/32/9811_2.png) [@cdawg](https://discourse.julialang.org/u/cdawg)\
**Post date:** [July 21, 2025, 8:15pm UTC](https://discourse.julialang.org/t/pluto-notebook-namespace-goes-stale-and-packages-go-missing/130903/3 "2025-07-21T20:15:38Z")

</div>

Its a relief its a known bug and not something more sinister. Thanks, I really appreciate it. Will follow the pluto issue.
