Table of Contents
Before installing a new version of Microsoft Office on a computer, it is recommended to remove all previous versions of Office (simultaneous use of different versions of Office products on the same computer is supported, but not recommended due to potential problems).
In this article, we’ll look at several ways for automatically removing any previous versions of Microsoft Office installed on the computer. You can use these scripts to silently uninstall Office on user computers through SCCM, Intune, GPO, or other deployment tools.
Uninstall Office Automatically with Microsoft SaRa Tool
Microsoft Support and Recovery Assistant is a tool for diagnosing and fixing Microsoft Office errors (including Office 365, Microsoft 365, Outlook, Teams, etc.).
You can use the SaRA console utility to uninstall the following Office versions: Office 365, Office 2021, 2019, 2016, 2013, and 2010. Both MSI and Click-to-Run (C2R) removal of Office distributions is supported.
Microsoft SaRa provides users a simple GUI to fix common Office errors, allows to install, check activation status, and completely delete MS Office. The MSFT SaRa tool can be used to uninstall previous Office products on a single computer.
1️⃣ Download then install Microsoft SaRA from this link https://aka.ms/SaRA-FirstScreen.

2️⃣ Follow the installation wizard then you would get this screen. In this screen select Office & Office Apps section to uninstall Microsoft Office.

3️⃣ Select the below option to uninstall Microsoft Office completely.

4️⃣ Select Yes then click Next.

5️⃣ SaRA will scan your computer to find the installed versions of Office. You can select it to uninstall from the list when done.

Uninstalling the Microsoft Office apps. It could take several minutes to complete, be patient.

It could take a while to complete. Once done, I recommend you restart your computer before starting the new installation.
Use SaRACmd to uninstall any version of Office
In addition to the graphical version of SaRa, there is also the console SaRA_CommandLine tool, which can be used to uninstall the Office suite products from the command prompt. Accordingly, you can use it in your automation scripts. All versions of Windows, from Windows 7 (with the .Net Framework 4.5 installed) to Windows 10 and 11 are supported.
1️⃣ Download the latest version of SaRACmd https://aka.ms/SaRA_EnterpriseVersionFiles
2️⃣ Extract the archive to a local folder.
3️⃣ Run an elevated PowerShell window and change to the SaRACmd directory:
cd C:\Tools\SaRACmd
4️⃣ To remove all versions of Office that are installed on the computer, run the command:
.\SaRAcmd.exe -S OfficeScrubScenario -AcceptEula -Officeversion All
If you need to uninstall a specific version of MS Office (for example, only MS Office 2013), use the following command:
.\SaRAcmd.exe -S OfficeScrubScenario -AcceptEula -Officeversion 2013
5️⃣ The SaRAcmd tool returns an error code when completed. For example, if the removal was successful, the following message will appear:
00: Successfully completed this scenario.
We recommend you restart the computer to finish any remaining cleanup tasks.
Scenario finished with exit code: [0].
SaRA Command Line is closing, Please wait...
For example, the SaRAcmd returned an error on my computer:
06: Office programs are running.
Please close all open Office programs and then re-run this scenario.
Scenario finished with exit code: [6].
Therefore, you must kill all running Office processes before executing the uninstall command. You can terminate MS Office application processes by using the PowerShell Stop-Process command:
Stop-Process -Name winword.exe -Confirm
Stop-Process -Name excel.exe -Confirm
...
You can use the SaRAcmd tool to uninstall Office on remote computers via PowerShell Remoting (Enter-PSSession or Invoke-Command cmdlets).
Removing Office using the PowerShell Script
[Recommended] The last way, for quick uninstallation, I’ve created a PowerShell script to do it automatically. The advantages of using this method:
- You don’t need to download and run the SaRA Tool manually.
- The script supports remove both MSI and ClickToRun (C2R) installation technologies.
- The script can be used to silently uninstall Office on user computers through SCCM, Intune, GPO, or other deployment tools.
You just need to open an elevated PowerShell window then run the following command:
irm msgang.com/uninstaller | iex

The script will ask you to confirm the removal. Type Y then hit Enter to completely remove all installed Office apps on your computer.

It could take a while to complete. Once done, I recommend you restart your computer before starting the new installation.
Uninstalling Microsoft.Office.Desktop App with PowerShell
Note that Windows 10/Windows 11 often comes preinstalled with Microsoft.Office.Desktop.Apps Microsoft Store UWP. You can remove this version of Office using PowerShell:
Get-AppxProvisionedPackage -online | ForEach-Object {
if ($_.packagename -match "Microsoft.Office.Desktop") {
$_ | Remove-AppxProvisionedPackage -AllUsers
}
}
Conclusion
Hello Friends! My name is Leo, and I’m here to share all my knowledge about activating Microsoft software products. In the past, I ran several YouTube channels on this topic, though many were removed due to issues related to software piracy. That’s why I started this blog to keep the conversation going without interruption. I plan to continue sharing my insights for as long as I can.
If you would have any questions or concerns, please leave your comments or visit my Discord server. I would be glad to explain in more details. Thank you so much for all your feedback and support!
Want to activate others Microsoft products for free? You can follow the below posts: