Maven tool of Java, how to using mvn uninstall package?

Java, mvn tool, how to using mvn uninstall package? Have some plugin, tool, shell script and command method?

3

2 Answers

If you want to uninstall/remove any artifact downloaded by maven just go to your ~/.m2/repository directory, where all installed artifacts are stored and delete that one which you want to get rid of.

All you have to do is remove the dependency from your pom.xml, maven should take care of the rest.

I really struggled with this because I had an upstream dependency that included the dependency I was trying to remove, so even mvn dependency:purge-local-repository didn't help - in that case, it might be worth trying to configure dependency exclusions (also in the pom.xml file).

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like