Where Does Leiningen Store Profiles?
Leiningen profiles.clj and credentials under ~/.lein, beside the Maven repository.
Last updated
Leiningen keeps personal state in a .lein directory in your home, headed by profiles.clj with plugins, repositories and credentials. Downloaded dependencies themselves land in the shared Maven repository under ~/.m2, which Leiningen shares with Maven and other JVM tools.
That two tree design splits backups sensibly. The .lein folder is small, personal and worth versioning minus secrets. The .m2 repository is a bulky redownloadable cache, so migrating it buys speed at the cost of gigabytes, never correctness.
Where Leiningen stores this, by platform
~/.lein/profiles.clj
Headline file is profiles.clj with user plugins and credentials. Dependency jars live separately in ~/.m2/repository. Copy .lein with no lein commands running; the repository can stay behind.
~/.lein/profiles.clj
Same layout as Linux. Homebrew and installer based setups share these paths, so profiles and credentials survive switching install methods on the same machine.
Frequently asked questions
how do i move leiningen settings to a new pc
Copy the whole .lein directory to the new machine's home folder. Profiles, plugin lists and credential entries travel together with no absolute paths in normal setups. Re enter credentials afterwards if they fail to transfer.
is project.clj the same as profiles.clj
No. project.clj declares each project for collaborators, while ~/.lein/profiles.clj holds your personal plugins, repositories and credentials across all projects. Version the first, keep the second out of git.
Notice an outdated path? Let us know.