Skip to main content
← Guides

How to Clean a Previous Office Install Before Activating

What this guide helps you do

Check which Office, Visio or Project is installed, remove old keys with ospp.vbs and avoid mixed versions before you activate your new activation key.

If the computer previously ran another Office, a trial or an old key, activating your new key can fail even when the key is valid. This guide shows you how to see what is installed, remove only what gets in the way and leave the computer ready, without deleting folders or touching the registry blindly.

You do not need this cleanup by default. Use it only if the computer previously had another Office, Visio or Project, or if you see an activation error or an unexpected edition.

Signs of leftovers from a previous install

  • Word or Excel shows another version or a different edition from the one you bought.
  • The wizard asks you to sign in with an account you do not recognize.
  • An "unlicensed product" or "activation required" banner appears soon after activating.
  • Two Office versions coexist, or Visio and Project are from a different year than Office.
  • Your key is rejected even though the delivery is correct.

What to avoid

  • Mixing versions or architectures. Office, Visio and Project must be compatible with each other, and it helps if they match in 32 or 64 bit. Check the product page before installing.
  • Deleting folders by hand. You can leave the computer in worse shape than before.
  • Using activators. They can leave settings that block legitimate activation.
  • Re-entering the key over and over. It will not fix an underlying conflict.
  1. Close all Office applications.
  2. Check which version and edition are installed (guide below).
  3. Remove what does not belong via Settings > Apps.
  4. Check with ospp.vbs /dstatus and remove the old key if there is one.
  5. Restart the computer.
  6. Install and activate the product you bought.

Step 1: identify what is installed

If you do not know which Office you have, follow How to identify your Office version before buying. Note the year, edition (Professional Plus, Home & Business, etc.) and whether it is 32 or 64 bit (in Word: File > Account > About Word).

If what is installed is not what you bought, uninstall it from Settings > Apps > Installed apps and install the right one.

Step 2: sign out of old accounts

In an Office app, open File > Account and sign out of any account unrelated to your purchase. If your product activates with a key (like Office Professional Plus 2021), it does not need an account to activate. If it is a subscription such as Office 365 Personal, it activates with the associated account and works differently: see Permanent Office or Office 365.

Step 3: open the console and go to the Office folder

Open Command Prompt as administrator and go to the Office folder for your version. For Office 2016, 2019, 2021 and 2024 the folder is called Office16; for Office 2013, Office15. Usual paths:

cd "C:\Program Files\Microsoft Office\Office16"

cd "C:\Program Files (x86)\Microsoft Office\Office16"

The second is for 32-bit Office on 64-bit Windows. If one path does not exist, try the other. Visio and Project are checked from the same folder with the same commands.

Step 4: check the status with /dstatus

cscript ospp.vbs /dstatus

You will see each installed product, its license status and the last five characters of the key. If you see a license that is not yours, or several, note those five characters.

Step 5: remove the old key with /unpkey

cscript ospp.vbs /unpkey:XXXXX

Replace XXXXX with the last five characters of the key you want to remove, as shown by /dstatus. Repeat for each key that is not yours, then run /dstatus again to confirm.

Step 6: restart and install your key

Restart the computer, then activate using your variant's method. If your order includes a key and you want to enter it from the console:

cscript ospp.vbs /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

cscript ospp.vbs /act

If your variant uses phone activation, follow Phone activation and CID and Office, Visio and Project: installation and telephone activation.

How to confirm it is activated

Run cscript ospp.vbs /dstatus again. Your product should appear with license status LICENSED and the key ending in your last five characters. You can also check File > Account in any app.

When to reinstall cleanly

If a conflict remains after removing keys and restarting, the safest route is usually to uninstall all of Office from Settings, restart and install only what you bought. Keep your delivery key at hand: a reinstall may need activating again, and not every variant allows a new activation. Check Windows Retail, OEM or phone activation and your product page.

What to send support if it is not resolved

Order number, product and year purchased, the /dstatus output (the last five characters are enough), whether Office is 32 or 64 bit, and the exact error code or message. More ideas in Office will not install or activate. Never send the full key in chat.

Frequently asked questions

Should I delete Office folders manually?

No. Uninstall from Settings and use ospp.vbs to view or remove keys. Deleting folders by hand can make things worse.

Does this guide work for Visio and Project?

Yes. They are checked from the same Office folder with the same ospp.vbs commands.

What if an old account shows up?

Sign out from File > Account. An Office Professional Plus key needs no account; a subscription does, and it must be the one from your purchase.

Can I mix Office 2024 with Project from another year?

Better not to. Install versions that are compatible with each other and confirm on the product page before buying.

What if /dstatus shows nothing?

Check that you are in the correct folder (Office16 or Office15) and that you opened the console as administrator.

Related comparisonOffice 365, Office 2024 or Office 2021: how to choose in 2026→ SovengridExplore Office→