Reference / Developer artifacts
Is it safe to delete ~/.m2/repository on a Mac?
Safe to delete
It re-downloads on demand the next time it's needed.
~/.m2/repository
What it is
Maven local repository — repopulated on next build
If you delete it
Next Maven build re-downloads dependencies (~3 min for big projects)
Recovery time
about 3 minutes
Category
Developer artifacts
Don't guess — let diskspace check it live.
It pressure-tests the path against your live disk state and stages it reversibly, so you never lose anything you needed.
$ brew install tymrtn/diskspace/diskspace
$ diskspace explain ~/.m2/repository # verdict + live pressure-test