I am trying to delete old artifacts and the directory they live in from my .m2/repository directory. For example I have several versions of projectA: 4.7.0.222, 4.7.0.223, 4.7.0.224 etc. I only need to keep 4.7.0.224 project since it is the latest build.
How can I remove the older 2 versions 4.7.0.222 and 4.7.0.223 without manually deleting them? I have tried this command:
mvn dependency:purge-local-repository -DreResolve=false -DactTransitively=false -Dverbose=true
When I was in those project directories, everything was successful, but the items still remained. Does maven have any commands that are similar to a full linux "rm -rf" or No?