Uninstalling software via the Command Prompt (CMD) or PowerShell is an efficient way to manage applications, especially when the “Apps & Features” GUI is unresponsive or when you need to automate the process via scripting.
The Windows Management Instrumentation Command-line (WMIC) is the most common method for identifying and removing software by name.
To see the exact name of the software as registered in the system, run:
wmic product get name
Use the following syntax (using MobaXterm as an example):
wmic product where "name like 'MobaXterm%%'" call uninstall
Note: The %% acts as a wildcard. Confirm the action by pressing Y when prompted.
If the software was installed using a Windows Installer (.msi) package, it is best removed using its unique Product GUID.
List all installed products and their identifying numbers:
wmic product get name, identifyingnumber
Once you have the GUID (e.g., {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}), run:
msiexec /x {YOUR-GUID-HERE} /qn
PowerShell is more robust for Windows 10 and 11. It can often find packages that WMIC misses.
powershell -command "Get-Package -Name 'SoftwareName*' | Uninstall-Package"
Example for MobaXterm:
powershell -command "Get-Package -Name 'MobaXterm*' | Uninstall-Package"
If you have Winget installed (standard on modern Windows 10/11), this is the cleanest method.
winget list "Software Name"
winget uninstall "MobaXterm"
Portable software (like MobaXterm Portable) does not appear in the system's “Installed Programs” list because it doesn't write to the registry.
To “uninstall” these:
C:\Tools\MobaXterm\).%AppData% or %LocalAppData% if necessary.| Issue | Solution |
|---|---|
| Error: 1605 | This action is only valid for products that are currently installed. Check if the GUID is correct. |
| Access Denied | Right-click CMD/PowerShell and select “Run as Administrator”. |
| App still running | Use taskkill /f /im processname.exe to force close the app before uninstalling. |
References: