Cleaning a maven repo

Cleaning a maven repo

Just saw the size of my local maven repo… and it isn’t nice

So, I’m wondering, is there a maven goal that cleans up ‘obsolete’ files? I want files like old snapshot jars deleted … cause, if you depend on SNAPSHOT versions of projects that update often, you do end up with LOTS of them!

andyhot

2 thoughts on “Cleaning a maven repo

  1. I wouldnt want to delete 1.5GB that easily : )

    I guess I was just looking for something like

    mvn clean:redundant-snapshots

  2. rm -rf ~/.m2/repository

    I’ve done that a few times and it always recovers (after downloading a shitload of jars of course..).

    but you know how maven is….maybe it’ll feel bitchy the day you do it and not recover for some reason.

Comments are closed.