# How to reload a module in Julia 1

**URL:** <https://discourse.julialang.org/t/how-to-reload-a-module-in-julia-1/17192>\
**Category:** General Usage\
**Created:** [November 5, 2018, 11:40pm UTC](https://discourse.julialang.org/t/how-to-reload-a-module-in-julia-1/17192 "2018-11-05T23:40:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ig-or](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ig-or/32/4975_2.png) [@ig-or](https://discourse.julialang.org/u/ig-or)\
**Post date:** [November 5, 2018, 11:40pm UTC](https://discourse.julialang.org/t/how-to-reload-a-module-in-julia-1/17192/1 "2018-11-05T23:40:19Z")

</div>

Hello!  
Do I have to reload julia if I just need to make a small change inside a module? What is the correct way to handle this?

For example, I created a big module mtest.

```julia
julia> using mtest
[Info: Precompiling mtest [top-level]

```

But, forget an ‘export’ statement inside:

```julia
julia> f1()
ERROR: UndefVarError: f1 not defined
Stacktrace:
 [1] top-level scope at none:0

```

After I fix the corresponding module file, how to load the changes to Julia?  
require looks like not working…

```julia

julia> require(mtest)
ERROR: UndefVarError: require not defined
Stacktrace:
 [1] top-level scope at none:0

julia> Base.require(Main, :mtest)
mtest

julia> using mtest

julia> f1()
ERROR: UndefVarError: f1 not defined
Stacktrace:
 [1] top-level scope at none:0

```

Best regards, Igor

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [November 5, 2018, 11:53pm UTC](https://discourse.julialang.org/t/how-to-reload-a-module-in-julia-1/17192/2 "2018-11-05T23:53:43Z")

</div>

Try using Revise.jl

---

<div class="post-metadata">

**Author:** ![ig-or](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ig-or/32/4975_2.png) [@ig-or](https://discourse.julialang.org/u/ig-or)\
**Post date:** [November 7, 2018, 11:45pm UTC](https://discourse.julialang.org/t/how-to-reload-a-module-in-julia-1/17192/3 "2018-11-07T23:45:23Z")

</div>

It works!! Thank you Stefan and Tim!
