Activating a version of Windows 10 has become quite a breeze thanks to Microsoft’s new system that ties a license to your hardware ID and stores it on the activation server, but what if you want to deactivate the operating system and completely removing the product key?

Microsoft does not provide such features in the Settings app, but fortunately, there’s actually an easy way to do the whole thing, and it doesn’t take more than just a couple of minutes.

If you’re wondering why on Earth someone would want to deactivate Windows 10 and uninstalling the product key, it’s because some users intend to keep their licenses when selling their devices. So, for example, you can sell your laptop with Windows 10 pre-installed, but without letting the new owner activate the operating system with your license key.

Resetting Windows 10 won’t remove the product key, so after the buyer completes the setup wizard and gets back to the desktop, the operating system will be once again activated thanks to the new system I’ve talked about earlier. Unless you deactivate Windows 10 and uninstall the product key, that is, leaving the new owner with just one option: activate the OS with their own license or else use Windows 10 as a trial for 30 days.

Everything comes down to just two different commands, and I’m going to explain both of them to know exactly what you’re doing.

Checking Windows 10 activation status

Checking Windows 10 activation status

First and foremost, you must be logged in with an administrator account in the Windows 10 Fall Creators Update install that you want to deactivate. Launch a Command Prompt or PowerShell window with administrator privileges (right-click the Start menu and hit PowerShell Admin).

The first command that we’re going to use in the elevated command line utility that you just launched is the following:

slmgr /upk

With this command, Windows 10 Fall Creators Update will uninstall the product key from your computer. When the process is complete, which shouldn’t take more than just a few seconds, you should see a message reading “Uninstalled product key successfully.” No other information will appear in the PowerShell window you’re running aside from the said dialog.

Deactivating Windows 10

This means that your product key has been removed, though you still have to clear it from the registry. There are lots of third-party solutions out there that can scan the Windows registry, find a product key, and then extract it, so you have to manually remove it as well. It’s worth knowing, however, that devices sold with an OEM product key that’s directly embedded in UEFI can’t have the product key cleared completely.

The following command can be used to clear the license from the registry and make it entirely unrecoverable – at this point, you’re supposed to have already backed up the product key, as you can’t recover it at a later time should you change your mind:

slmgr /cpky

Just like in the case of the previous command, you’re going to receive a message saying that “product key from registry cleared successfully.” Again, no other information is displayed in the PowerShell or Command Prompt window that you’re running.

At this point, Windows 10 Fall Creators Update should be deactivated and the key should no longer be available in the registry.

Removing Windows 10 product key from registry

To verify that your Windows 10 installation is no longer activated, you can launch the Settings app and head over to Update & Security > Activation > Windows or simply type winver in the Start menu. If the process has been completed successfully, you should see a message saying “Windows is not activated” and a second one reading “Product ID: Not Available.”

Reboot your computer just to make sure, and you can then sell your computer safely because nobody can recover your Windows product key.