This sounds like it should be easy, but I've yet to find an answer. If I install an artifact with mvn install, how do I remove said artifact? I tried using dependency:purge-local-repository, but it only removes the dependencies - not the actual artifact.
Any ideas? I'm using maven 2.2.1 if that helps.
Edit: I'm aware of the similar question, but I'm unsatisfied with the answer of removing my entire .m2 repo just to remove a single SNAPSHOT dependency. Also, as I mentioned, purge-local-repository doesn't work since it only seems to be removing the dependencies and not the actual artifact.
Edit 2: I'm probably not being very clear. Consider this example. I have a SNAPSHOT artifact that is called my-artifact. my-artifact has two dependencies: my-dependency-one and my-dependency-two. I would like to write a script that will delete all three without me having to parse the pom.xml file. In other words, I'd like to purge my-dependency-one, my-dependency-two, AND my-artifact without having to explicitly type into maven that I want to delete my-artifact.
In the answers for the 'duplicate questions' it suggests going in and manually deleting the artifacts from the .m2 repo. That is not an answer to this question given that the script does not knew the group or artifact name when it executes the maven command. I want something similar to dependency:purge-local-repository except that it should not only remove the dependencies, but the artifact itself.
I'm guessing based on the confusion in the comments that this is just not possible. If it isn't that would be an acceptable answer.