title: How to detach a package without restarting
body: <p>Ref: <a href="https://pkgdocs.julialang.org/v1/repl/#package-commands" rel="nofollow noreferrer">docs</a> for <code>Pkg</code></p>
  <p>I want to compare two methods with the same name from two different packages in the same session/script. To avoid name collision, I would like to <strong>negate</strong> <code>using</code> (i.e. &quot;undo&quot; / &quot;reverse&quot;). Something like what <a href="https://stackoverflow.com/questions/6979917/how-to-unload-a-package-without-restarting-r">detach</a> does for <code>R</code>.</p>
  <pre><code>using PackageOne
  some_method()
  
  undo using PackageOne  # &lt;-- negate `using PackageOne` without restarting
  using PackageTwo
  some_method()  # name collision avoided here
  </code></pre>