How to uninstall MongoDB Server on Windows
Back up MongoDB databases before uninstalling the server, and keep the data folder until recovery has been checked.
Quit the app
Close MongoDB Server and any work it is running, then use Task Manager (Ctrl+Shift+Esc) to check for its remaining processes.
Use its uninstaller
Open Settings › Apps › Installed apps, find MongoDB Server and choose Uninstall. Use the vendor uninstaller rather than deleting its program folder.
winget uninstall --id MongoDB.Server --exact
For this installation, winget invokes the registered removal method. It is not a separate cleanup of user data. Windows may ask for administrator approval.
Check the result
winget list --id MongoDB.Server --exact
Test-Path -LiteralPath "${env:ProgramFiles}\MongoDB\Server\9.0\data" -ErrorAction Stop
Test-Path -LiteralPath "${env:ProgramFiles}\MongoDB\Server\9.0\log" -ErrorAction Stop
Read winget's result as well as its exit status: an explicit no-installed-package result concerns only this package, while a source, access or query error leaves the answer unknown. A successful Test-Path returning True means that exact location remains; False means it is absent. Neither result checks other paths. The commands do not delete anything.
What Mole lists
| Location | Item | Default |
|---|---|---|
%ProgramFiles%\MongoDB\Server\9.0\data |
Personal data; back up before removal | Listed but not selected |
%ProgramFiles%\MongoDB\Server\9.0\log |
Cache, logs or app support files; check the named folder | Selected by default |
In the later retest, the MSI removed the MongoDB service. Mole listed data without selecting it and listed log selected by default. The run removed log but left data unselected; an independent read confirmed only data remained under the version directory. The database folder was not deleted.
These defaults assume Remove data and settings with apps is off. Explicit Select all or Also remove user data can include the listed personal-data rows. Check the selection before confirming. Selected files that Mole removes go to the Recycle Bin; selected registry entries are backed up before removal. The vendor uninstaller has its own deletion behavior.
What this test covered
Recorded on 2026-10-20: MongoDB Server, version 9.0.2, machine-wide, MSI, winget package MongoDB.Server. The evidence comes from an ARM64 Windows test environment and a development build of Mole. It does not certify the current downloadable package or removal of real signed-in accounts, synchronized data or production projects.
Vendor documentation. The paths and removal results above are observations from the Windows test unless explicitly attributed to the vendor.
