How to force lein deps to re-fetch local jars/libs

Leiningen uses maven for dependency management. Maven by default stores its repo in

$HOME/.m2/repository

Prior to leiningen version 2, the dependencies would be copied to <projecthome>/lib, but version 2 and later builds a classpath pointing directly to the repository.

So delete the jar in your local maven repo and you should force a (re)download.

Alternatively, it's useful to know that for snapshot dependencies, maven will only check for new versions of the snapshot once a day (by default). In maven you can force it using the -U flag. I don't think leiningen expose that, but you could do.... (but see answer from barry-wark)

# force update of snapshots before starting repl
$ lein -U repl

In lein 2, you can use the -U flag, e.g.:

lein -U jar