# Programmatically restart julia

**URL:** https://discourse.julialang.org/t/programmatically-restart-julia/73806
**Category:** General Usage
**Created:** [December 30, 2021, 9:03am UTC](https://discourse.julialang.org/t/programmatically-restart-julia/73806 "2021-12-30T09:03:43Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [January 17, 2023, 5:30pm UTC](https://discourse.julialang.org/t/programmatically-restart-julia/73806/6 "2023-01-17T17:30:11Z")

</div>

FYI, a more complete function by @fredrikekre is [available here](https://github.com/JuliaLang/julia/issues/32129#issue-448121208), and it is called `restart()`.

I added it to the `startup.jl` file and tested it in VS Code and in a standalone Julia REPL and it seems to work very well.

For the latter, it restarts the REPL in the same window very quickly in Julia 1.9 and thus, it might be seen as a “clear workspace” analogue.

---

_[View the full topic](https://discourse.julialang.org/t/programmatically-restart-julia/73806)._
