I am a noob in scala. I installed it using coursier and am using sbt to try and write code in it. Basically, I use the two commands sbt compile
and sbt run
for my code. Along, with that I was experimenting with build.sbt
. It seems that I've downloaded too many scala versions while running sbt compile
again and again.
I have few questions regarding sbt compile
sbt compile
? Basically, I have a knack to know what's going on in my pc when running commands. Keep things clean and get a view of what directories does sbt
use to install things. I simply want to undo what sbt compile
does and run it again to observe things.sbt clean
only affects the target
directory.
Yes, sbt stores (install is kind of a heavy word here) everything it downloads in a cache directory, so that if multiple projects depend on the same tools then you don't need to re-download and re-store them.
The specific folder depends on your OS, but it usually is in your home
under .coursier/cache
or something similar: https://get-coursier.io/docs/cache#default-location
However, unless you are dealing with a weird bug or just want to free disk space, just doing sbt clean
will ensure your project is in a clean state.