How to Uninstall Maven On Mac

July 18, 2023 by SkilledEngg

In this article, I will explain the steps to uninstall Maven. This article is part of a series on topic Maven Complete Understanding. If you are really interested to learn Maven in depth from basic to advanced. Please go through all the articles of this series. You can start from here .


Table of Contents:

  1. Guideline for Mac and Other Operating Systems
  2. Uninstalling Using Brew
  3. Uninstalling Without Brew

Guideline for Mac and Other Operating Systems

For Mac operating system, any of the 2 method can be used which are mentioned here.

For other operating system, you should follow the 2nd method , which is not using brew.

Uninstalling Using Brew

If you have installed maven using brew, then it will be very easy to uninstall it.

You can check using below command if this is installed using brew or not: brew list mvn

If you get output something like below, then it means it is installed through brew otherwise not.

If it is installed through brew then you can run the following command to uninstall MAVEN: brew uninstall mvn

Take reference from below:

Uninstalling Without Brew

If you haven’t installed maven using brew then you need to check where the apache-maven’s directory is present.

To check that run the following command:which mvn

This command will give the path of maven directory in output.

Now, we will go to the corresponding path and will delete this maven directory.

Now, if we check the maven version, it will give message as : command not found.

If you want to install MAVEN , please follow the installation guide for the same.

Leave a Comment