Guides

How to Uninstall Windows Product Key (Before Selling Your PC)

By Marc DuboisPublished Aug 28, 2026Updated Oct 14, 20261 min read

Direct Answer

Before selling or transferring a PC, deactivate your Windows key with "slmgr /upk" so you can reuse a retail license or protect it. Here is how to properly remove your product key.

Key Takeaways

Before selling or transferring a PC, deactivate your Windows key with "slmgr /upk" so you can reuse a retail license or protect it. Here is how to properly remove your product key.

How to Uninstall a Windows Product Key: The Direct Answer

To remove a Windows product key, open an admin Command Prompt and run slmgr /upk to deactivate, then slmgr /cpky to clear the key from the registry. Do this before selling a PC (to protect or reuse a retail key) or before transferring a retail license to a new machine.

When You Should Remove Your Key

Two main scenarios: you are selling or giving away the PC and want to protect your retail key from misuse, or you are transferring a retail license to a new computer. In both cases, deactivating on the old machine first is the correct step.

Step-by-Step: Removing the Key

  • Open Command Prompt as administrator (right-click > Run as administrator)
  • Run slmgr /upk and press Enter — this uninstalls the product key
  • Run slmgr /cpky and press Enter — this clears the key from the registry
  • Restart the PC — Windows is now deactivated

Retail vs OEM: What You Can Transfer

Only retail licenses can move to a new PC. If your key is retail, deactivate it on the old machine and activate it on the new one. OEM keys are permanently tied to the original motherboard and cannot be transferred — check your license type with slmgr /dli first.

Before Selling Your PC

Deactivating Windows is only part of preparing a PC for sale. You should also back up your files, then reset the PC (Settings > System > Recovery > Reset PC) to wipe your personal data. This protects both your license and your privacy.

The Bottom Line

Remove your product key with slmgr /upk and slmgr /cpky before selling or transferring. Retail keys can then be reused on a new PC. If you need a fresh genuine key, see the product below.

FAQ

How do I remove my Windows product key from a PC?

Open an admin Command Prompt and run "slmgr /upk" to uninstall the product key, then "slmgr /cpky" to clear it from the registry. This deactivates Windows on that machine.

Should I remove my Windows key before selling my PC?

Yes, if you have a retail license you want to reuse, or to protect your key from being used by the new owner. OEM keys cannot be transferred and stay with the hardware.

Can I reuse my Windows key on a new PC after removing it?

Yes, if it is a retail license. Deactivate it on the old PC with "slmgr /upk", then activate it on the new one. OEM keys cannot be transferred to a new PC.

What is the difference between slmgr /upk and /cpky?

"slmgr /upk" uninstalls the product key and deactivates Windows. "slmgr /cpky" clears the key from the registry so it cannot be recovered. Run both when transferring or selling.

Does removing the product key delete my files?

No. Removing the product key only deactivates Windows — your files and apps remain. If selling the PC, you should also reset or wipe the drive separately to remove personal data.

MD

Written by

Marc Dubois

Marc Dubois is a digital products specialist at DigitalTools, covering software, subscriptions, and online tools for professionals and businesses. Our reviews are researched independently and updated regularly to reflect current pricing and features.

DigitalTools is reader-supported. Some links may earn us a commission at no extra cost to you. Learn more.

How we verify information

Pricing, dates and product details in this article are checked against official publisher and store sources before publishing, and reviewed again when the topic changes. The update date at the top of this page reflects the most recent review. Spot an error? Contact us and we'll correct it.

Related Products

Windows 11 Pro
Best Seller-88%

Microsoft

Windows 11 Pro

Genuine Windows 11 Pro OEM license key, lifetime.

LifetimeLicense Key
$24.99$199.99
Microsoft 365 Personal
Best Seller-29%

Microsoft

Microsoft 365 Personal

Word, Excel, PowerPoint, 1TB OneDrive — genuine license.

12 MonthsSubscription Key
$49.99$69.99
CyberLink PhotoDirector 365 (1 Year License) (Windows) (Subscription / Global)
-33%

Microsoft

CyberLink PhotoDirector 365 (1 Year License) (Windows) (Subscription / Global)

CyberLink PhotoDirector 365 is an all-in-one photo editing suite that blends professional RAW processing, layer-based compositing, and cutting-edge generative AI tools into a single, intuitive platfor

License Key
$75.99$113.99
Intuit QuickBooks Desktop Pro 2020 (Windows) (Lifetime License / United Kingdom)
-33%

Microsoft

Intuit QuickBooks Desktop Pro 2020 (Windows) (Lifetime License / United Kingdom)

This downloadable version of QuickBooks Desktop Pro 2020 from Intuit includes a perpetual license. QuickBooks Desktop Pro will let you organize business finances and track performance to inform decisi

License Key
$80.99$120.99

Related Articles