Maybe this question was already posted here. If yes, please attach the link, I couldn't find out the same.
I would like to clean my old and not used dependencies from pom.xml, can someone advice me how to do this in better way?
Thanks for your help !

Anyone? any ideas? I marked some dependencies and run test, this gave me the option to check if all cycles will run as needed, but still have a lot of dependencies at the POM.XML that I would like to delete.

1 Answer 1


Delete .m2 folder which contains all the dependencies form your user-home.Then re-build your package using "mvn clean package" command.All your dependencies will be removed and when you run a maven project ,the required dependencies will get downloaded and again stored in your local repository(.m2).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.