# Way to programmatically clear last println() statement in Jupyter cell?

**URL:** <https://discourse.julialang.org/t/way-to-programmatically-clear-last-println-statement-in-jupyter-cell/3582>\
**Category:** General Usage\
**Tags:** question\
**Created:** [May 7, 2017, 9:34pm UTC](https://discourse.julialang.org/t/way-to-programmatically-clear-last-println-statement-in-jupyter-cell/3582 "2017-05-07T21:34:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [May 7, 2017, 9:34pm UTC](https://discourse.julialang.org/t/way-to-programmatically-clear-last-println-statement-in-jupyter-cell/3582/1 "2017-05-07T21:34:11Z")

</div>

Is there a way to remove the output of a Jupyter cell (equivalent of what gets done when you run the cell for the first time)?

This would allow you to use `println(...)` and the like inside `@manipulate` clauses

Otherwise you get something like:

 ![](https://global.discourse-cdn.com/julialang/original/3X/d/4/d48847ed6291b85fe952e500c348b0cb3fee9110.png)

// note: this only gets worse for bigger text blocks

---

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [May 7, 2017, 9:45pm UTC](https://discourse.julialang.org/t/way-to-programmatically-clear-last-println-statement-in-jupyter-cell/3582/2 "2017-05-07T21:45:42Z")

</div>

Addressed in [https://github.com/JuliaLang/IJulia.jl#clearing-output](https://github.com/JuliaLang/IJulia.jl#clearing-output)

Just had to add:

- `IJulia.clear_output(true)`

before the `println(...)`

---

<div class="post-metadata">

**Author:** ![ValdarT](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/valdart/32/24146_2.png) [@ValdarT](https://discourse.julialang.org/u/ValdarT)\
**Post date:** [February 12, 2019, 11:16am UTC](https://discourse.julialang.org/t/way-to-programmatically-clear-last-println-statement-in-jupyter-cell/3582/3 "2019-02-12T11:16:26Z")

</div>

Adding `IJulia.clear_output(true)` doesn’t seem to work anymore because the [controls also get cleared](https://github.com/JuliaGizmos/Interact.jl/issues/193). Does anyone know any other workaround?
