# Can I unexport something?

**URL:** <https://discourse.julialang.org/t/can-i-unexport-something/79436>\
**Category:** General Usage\
**Created:** [April 13, 2022, 2:06pm UTC](https://discourse.julialang.org/t/can-i-unexport-something/79436 "2022-04-13T14:06:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [April 13, 2022, 2:06pm UTC](https://discourse.julialang.org/t/can-i-unexport-something/79436/1 "2022-04-13T14:06:43Z")

</div>

I’m using a macro which `export`s something that I don’t want exported. Is there some `Base.DarkMagic._remove_export_binding_assuming_P_eq_NP` function I can use for that?

---

<div class="post-metadata">

**Author:** ![Jeff\_Emanuel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeff_emanuel/32/15440_2.png) [@Jeff\_Emanuel](https://discourse.julialang.org/u/Jeff_Emanuel)\
**Post date:** [April 13, 2022, 2:18pm UTC](https://discourse.julialang.org/t/can-i-unexport-something/79436/2 "2022-04-13T14:18:18Z")

</div>

Fix the source of the problem instead of hacking at the erroneous result.

---

<div class="post-metadata">

**Author:** ![Per](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/per/32/10387_2.png) [@Per](https://discourse.julialang.org/u/Per)\
**Post date:** [April 13, 2022, 3:05pm UTC](https://discourse.julialang.org/t/can-i-unexport-something/79436/3 "2022-04-13T15:05:04Z")

</div>

Creating a binding (e.g. a dummy variable) to that name before the export happens would prevent the name from being exported, I guess.

---

<div class="post-metadata">

**Author:** ![Octogonapus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/octogonapus/32/9489_2.png) [@Octogonapus](https://discourse.julialang.org/u/Octogonapus)\
**Post date:** [April 13, 2022, 3:55pm UTC](https://discourse.julialang.org/t/can-i-unexport-something/79436/4 "2022-04-13T15:55:01Z")

</div>

If you can put the usage of that macro in a module, you could reexport whatever symbols you want. There is even a package to do this: [Reexport.jl](https://github.com/simonster/Reexport.jl).
