Skip to content

Is it safe to delete Maven local repository?

Libraries and plugins that Maven has downloaded for your Java projects, plus artifacts you installed from your own projects.

Usually safe

It can be recreated, but it takes a download, a reinstall or the tool's own command.

~/.m2/repository

What it is

Maven stores every dependency and plugin it downloads here, shared by all your Maven projects. It also keeps the artifacts you build and install from your own projects, which other projects on this Mac can use before you release them. Maven downloads anything that's missing on the next build, but artifacts you installed yourself come back only when you build and install those projects again.

If it's removed

The next build of each project downloads its dependencies again. Projects that use artifacts you installed locally don't build until you install those artifacts again.

How it's removed

Moved to the Trash, where you can restore it.

PRO

The free analyzer finds it and explains it. Removing it is Pro, after a review sheet that lists every move and command. It's never checked for you: it waits for your choice.

Sources

Last checked on 26 Sep 2026. Every entry is written and checked by hand; the app and the command-line tool use the same words.