title: How to fully clean, re-resolve and rebuild a Scala sbt-managed project in IDEA?
body: <p><strong>TL;DR:</strong> How can I fully reconcile all dependencies in IntelliJ when SBT file changes</p>
  
  <p>I have a SBT project setup in IntelliJ. For the most part if works like a charm, but it is quite a pain for me, to change the version of the dependencies and compilers.</p>
  
  <p>What I hope to do, is to update my SBT file, and click something like <em>clean project</em> in IntelliJ, so it gets up to date.</p>
  
  <p>The best menu item I have found is <em>Rebuild project</em>. It reads new dependencies, but keeps the old ones around, so External Libraries contains multiple versions of the Scala runtime and 3rd party libraries.</p>
  
  <p>To get around this I can close IntelliJ and delete all files in <code>.idea/libraries</code>. When I restart IntelliJ it will re-resolve the dependencies. It works, but manually deleting metadata files indicates that I am doing the wrong thing.</p>