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?