How to remove an old Microsoft Office version and product key
Updated 2026-11-04
How to remove an old Microsoft Office suite
If Microsoft Office 2024 LTSC shows up as an older version after installing, such as Office 2021, delete the leftover licence files from previous installations. In File Explorer, go to C:\ProgramData\Microsoft\Office\Licenses or %LocalAppData%\Microsoft\Office\Licenses (turn on hidden items if needed) and delete the contents of the Licenses folder. Then open any Office app and enter your product key again to activate the correct Office 2024 version.
Step-by-step solution
- Close all Office applications: make sure no Office apps are running.
- Open File Explorer.
- Go to the correct folder: for a volume-licensed version (like Office LTSC), go to
C:\ProgramData\Microsoft\Office\Licenses. For a Microsoft account-based licence, go to%LocalAppData%\Microsoft\Office\Licenses. - Show hidden items: if the “ProgramData” or “Local” folders aren't visible, open the “View” menu in File Explorer and select “Hidden items”.
- Delete all files: inside the “Licenses” folder.
- Open any Office application: like Word or Excel.
- Enter your product key: when prompted, instead of signing in with your Microsoft account.
- Confirm: check the product information (File → Account) to make sure Office 2024 now appears correctly.
How to remove an old Microsoft Office product key from your computer
If you need to remove a Microsoft Office licence key from your computer – to switch accounts, upgrade, or fix activation problems – follow these steps.
Step 1: Open Command Prompt as administrator
Press Win + R, type cmd and press Enter. Or click Start, type cmd, right-click Command Prompt and select Run as administrator.
Step 2: Go to the Office installation folder
Depending on your Office version, enter one of these commands and press Enter.
For 32-bit Office on 64-bit Windows:
cd "C:\Program Files (x86)\Microsoft Office\Office16"For 64-bit Office, or 32-bit Office on 32-bit Windows:
cd "C:\Program Files\Microsoft Office\Office16"(Replace Office16 with Office15 for Office 2013, Office14 for Office 2010. Office 2016 to 2024 all use Office16.)
Step 3: Remove the licence key
Run this command to check the installed licence:
cscript ospp.vbs /dstatusFind the last five characters of the installed product key, then enter this command to remove it:
cscript ospp.vbs /unpkey:XXXXX(Replace XXXXX with the last five characters of your product key.)
Step 4: Check the licence was removed
cscript ospp.vbs /dstatusIf no licence is shown, the removal was successful.
Final step (optional): Reactivate Office
If you're installing a new licence, enter:
cscript ospp.vbs /inpkey:YOUR-NEW-KEYThen activate Office with:
cscript ospp.vbs /actConclusion
With these steps you can remove an Office licence key from your computer – useful when switching accounts, fixing activation problems, or upgrading to a different edition. Still stuck? Reply to your order email or contact us with a screenshot of File → Account. Please don't try your new key many times, as each failed attempt can count against it.

