Quick Guide to Uninstall MongoDB from Windows 10

Uninstall MongoDB Featured Image

In this tutorial, I will walk you through an easy step-by-step guide on how to uninstall MongoDB from Windows 10.

Here are different ways to uninstall MongoDB from Windows 10.

How to Check if MongoDB is Installed?

Here are steps to check if you have MongoDB installed on your Windows machine.

  • Open File Explorer
  • Go to This PC from the left sidebar
  • Open C:/ drive
  • Look for the mongodb directory here if you had installed MongoDB in this location.
  • Or, simply navigate to the file path you had originally installed MongoDB and look there for the mongodb directory.

How to Uninstall MongoDB from Apps & Features Settings?

Get started by following the below steps to uninstall MongoDB via the Apps & Features settings.

  • Click start button and go to settings by clicking the gear icon.
  • Click Apps.
  • Under the Apps & features subheading, look for a search box and search for MongoDB.
  • Click the MongoDB application.
  • Lastly, click Uninstall.
  • Check in the file path where you had installed MongoDB. The mongodb directory should now be gone.
  • You might be prompted to restart your Windows machine. Even if you are not, it is recommended you do it. Sometimes, it might take time to for changes to reflect.

How to Uninstall MongoDB from Command Prompt?

Follow the below-mentioned steps to uninstall MongoDB using Command Prompt in Windows 10.

  • Go to Start and search for Command Prompt
  • Or, simply press the Win key+R to open Run. Type cmd and hit Ctrl+Shift+enter to run Command Prompt as administrator.
  • Right click on the result and select Run as administrator
  • Now, pass this command:
C:\>C:\MongoDB\bin\mongod.exe --config C:\MongoDB\mongod.conf --remove

Make sure the file path of the MongoDB directory is correct. If it is different from the above snippet, then search for the MongoDB directory in your system. Navigate into the path until you find both these paths. Copy the path from the path field and paste and then modify it here accordingly.

  • After deleting, make sure you check for the mongodb directory in your system whether it has been deleted or not.
  • You might be prompted to restart your Windows machine. Even if you are not, it is recommended you do it. Sometimes, it might take time to for changes to reflect.

How to Uninstall MongoDB Using Registry Editor in Windows 10?

Follow the below steps to uninstall MongoDB using Registry Editor in your Windows 10 machine.

  • Open Start and search for Registry Editor and click the result. Or, simply press the Win key+R to open Run. Type regedit and hit enter.
  • You will be prompted by Windows saying “Do you want to allow this app to make changes?”. Click Yes.
  • Now, in the path field on top, simply paste this path:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\MongoDB

  • Next, on the sidebar on the left, you should now be able to see the MongoDB directory.
  • Right click on it and click delete
  • Now, you will need to again check in the path where you originally installed MongoDB for the mongodb directory if it exists or not.
  • You might be prompted to restart your Windows machine. Even if you are not, it is recommended you do it. Sometimes, it might take time to for changes to reflect.

How to Uninstall MongoDB Using Control Panel from Windows 10

Follow the methods below to uninstall MongoDB from Control Panel in Windows 10.

  • Open Start and search for Control Panel. Click the result.
  • Or, simply press the Win key+R to open Run. Type control and hit enter.
  • Click Programs
  • Under the Programs and Features option, click Uninstall a Program
  • Look for MongoDB and right click on it.
  • Now, click Uninstall.
  • You will be promptedby Control Panel by saying “Are you sure you want to uninstall MongoDB…”. Click Yes.
  • To make sure it is completely removed, check in the path where you originally installed MongoDB for the mongodb directory if it exists or not.
  • You might be prompted to restart your Windows machine. Even if you are not, it is recommended you do it. Sometimes, it might take time to for changes to reflect.

How to Uninstall MongoDB Using .msi Installer in Windows 10

Follow the steps demonstrated below to uninstall MongoDB using the .msi installer used for installing, repairing, and uninstalling MongoDB from Windows 10.

  • Open Start and search for .msi
  • Click the MongoDB .msi installer file
  • You should now see a MongoDB setup open for you. Click Next.
  • Click Remove
  • To make sure it is completely removed, check in the path where you originally installed MongoDB for the mongodb directory if it exists or not.
  • You might be prompted to restart your Windows machine. Even if you are not, it is recommended you do it. Sometimes, it might take time to for changes to reflect.

Read More: Comprehensive Guide to Install and Set up MongoDB on Windows

Conclusion

In this tutorial, I covered an easy step-by-step guide on how to uninstall MongoDB from Windows 10.

Noteworthy References

Journal Dev

SO Answer

How To Geek