Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (47.6k points)

I saw a tutorial that said to run this:

C:\mongodb\bin\mongod.exe --config 

C:\mongodb\mongod.conf --remove

but that command does not work since there is not a mongod.conf file in the folder of mongodb in my windows, also, I don't want only to stop the service, but I want to remove all, including files, services, etc, it is possible?

Thanks in advance I am using windows 8.1

2 Answers

0 votes
by (106k points)

To uninstall mongodb from windows you can use the below-mentioned command:-

\MongoDB\bin\mongod.exe –config C:\MongoDB\mongod.conf –remove

0 votes
by (108k points)

The one-line command for uninstalling mongodb from windows is:

C:\>C:\MongoDB\bin\mongod.exe --config C:\MongoDB\mongod.conf --remove

Write the above command in your command prompt. Make sure to open your command prompt as an administrator. 

For the long procedure, refer the following step:

  1. Navigate to service.msi file and stop your MongoDB services

  2. Now go to your C drive and delete all the folders that contain your MongoDB files

  3. Then run your command prompt as the administrator and write the following code:

sc delete MongoDB

If the above command throws some error like service not found then go to your services and check whether you are giving proper service name for MongoDB. 

If you want to learn more about MongoDB then go through this MongoDB course for more insights.

Related questions

0 votes
2 answers
0 votes
1 answer
asked Jan 5, 2020 in Web Technology by ashely (50.2k points)
0 votes
1 answer
0 votes
2 answers

Browse Categories

...