Uninstall Programs using Command Prompt in Windows

Print Page

To uninstall programs using Command Prompt, we are going to use the Windows Instrumentation command-line interface (WMIC) in Windows.

Steps:

Open a Command Prompt instance, type in WMIC, and press Enter. Then to get the list of all installed programs enter this command:

product get name, version


This will populate a list of installed programs on your PC with its complete name and version number.

Note: WMI Product class will give you information only for software installed using MSI technology.

Just the name of the program is enough for uninstalling it, but I have added version number filter so that you don’t have to type in the lengthy names, like for instance, as seen in image, Microsoft Office. We can uninstall it with only its version. If you’d like to see all available information of a program just use this command: product

If needed, you can also save the complete list of installed programs to an external file like this:

product get /format:csv > C:\your\path\programs.csv

Now, to uninstall a particular program, run this command:

product where name="your-program-name" call uninstall

To uninstall with its version run the command like this:

product where version="1.0.1.0" call uninstall

Above commands will prompt you before starting its process. For prompt-less execution or silent uninstall, add the /nointeractive switch:

product where name="your-program-name" call uninstall /nointeractive

On successful uninstall you will get RetrunValue = 0;:

Bonus: To get a list of installed hotfix (QFE – Quick Fix Engineering) updates in WMIC, use this:

qfe list

These command works on Windows 8, Windows 7, Windows Vista, Windows XP Professional, and Server editions.