# Gc() function no longer exists?

**URL:** <https://discourse.julialang.org/t/gc-function-no-longer-exists/40310>\
**Category:** New to Julia\
**Created:** [May 28, 2020, 2:34am UTC](https://discourse.julialang.org/t/gc-function-no-longer-exists/40310 "2020-05-28T02:34:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [May 28, 2020, 2:34am UTC](https://discourse.julialang.org/t/gc-function-no-longer-exists/40310/1 "2020-05-28T02:34:13Z")

</div>

I start up julia from the command line using 1.4.1 (from Debian packages) and run:

```julia
dlakelan@pingpong:~$ julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.4.1
 _/ |\ __'_|_|_|\__'_| | Debian ⛬ julia/1.4.1+dfsg-1
|__/ |

julia> gc()
ERROR: UndefVarError: gc not defined
Stacktrace:
 [1] top-level scope at REPL[1]:1
 [2] eval(::Module, ::Any) at ./boot.jl:331
 [3] eval_user_input(::Any, ::REPL.REPLBackend) at /build/julia-pifKTc/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
 [4] run_backend(::REPL.REPLBackend) at /home/dlakelan/.julia/packages/Revise/AMRie/src/Revise.jl:1023
 [5] top-level scope at none:0

```

that seems odd? Or did explicit gc() disappear at some point and I’m just seeing old code examples on the net?

Or is this specifically because my .julia/config/startup.jl loads Revise?

---

<div class="post-metadata">

**Author:** ![virtualgraham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/virtualgraham/32/15200_2.png) [@virtualgraham](https://discourse.julialang.org/u/virtualgraham)\
**Post date:** [May 28, 2020, 2:47am UTC](https://discourse.julialang.org/t/gc-function-no-longer-exists/40310/2 "2020-05-28T02:47:32Z")

</div>

Perhaps you’re looking for `GC.gc()`

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [May 28, 2020, 2:56am UTC](https://discourse.julialang.org/t/gc-function-no-longer-exists/40310/3 "2020-05-28T02:56:25Z")

</div>

probably! but that certainly wasn’t what was in the first 5 or 10 online examples I checked… did gc move to GC recently (ie. the last 2 years)?

---

<div class="post-metadata">

**Author:** ![virtualgraham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/virtualgraham/32/15200_2.png) [@virtualgraham](https://discourse.julialang.org/u/virtualgraham)\
**Post date:** [May 28, 2020, 2:58am UTC](https://discourse.julialang.org/t/gc-function-no-longer-exists/40310/4 "2020-05-28T02:58:11Z")

</div>

This is a great example of why I suggested that help? should include deprecated items.

> [@Help? for deprecated and renamed items](https://discourse.julialang.org/t/help-for-deprecated-and-renamed-items/40307):
>
> It would be great if Julia help? would offer suggestions for deprecated and renamed items. Many times I have searched Google and found posted solutions that use functions or keywords that have since been deprecated or renamed. Two that I have encountered just recently are shift! and typealias. But there are many such examples. When you try to get help for shift! for example it only says: Couldn't find shift! Perhaps you meant sort! or circshift! No documentation found. Binding shift! does …
