Purge maven dependencies from local repository

The Apache Maven dependency plugin provides the function to remove projects dependencies from the local repository.

The command has to be run in the maven project where the pom.xml resides.

mvn dependency:purge-local-repository -Dmaven.repo.local=/path/to/repo

If you have a lot of snapshot versions, you can remove than completely and download the latest snapshot from your maven repository.