I want to upgrade to a newer version of maven. For that I first want to remove the existing version of maven in the computer as told here. I tried:
sudo apt-get remove maven2
but it says:
$ sudo apt-get remove maven2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'maven2' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
Then I typed mvn -version just to make sure that maven is not present, but to my surprise I found:
$ mvn -version
The program 'mvn' can be found in the following packages:
* maven
* maven2
Unsure of what to do next, I did locate maven and deleted everything that was present in /usr/share/maven-repo. But after this, if i type mvn -version, it shows the same output that was shown above.
How can I automatically remove maven?
sudo apt-get purge maven2and check again. – αғsнιη Sep 22 '14 at 09:22mavenis not installed in your system. You can skip the 1 step and go ahead with remaining steps in the tutorial you mentioned – aneeshep Sep 22 '14 at 09:38mvn -versionshould give some error message – Sanchit Jain Sep 22 '14 at 09:42sudo apt-get remove maven– Sanchit Jain Sep 22 '14 at 09:46mvn -versionactually throws an error message, saying where you can get the program from. – s3lph Sep 22 '14 at 12:24