Device Manager Code 21 — Windows Is Removing This Device

Short answer: Windows is removing this device — a temporary state shown while a device is being uninstalled or reconfigured.
CodeCode 21
Applies toWindows device (any brand)
SeverityUser-fixable
Most common causeYou (or an installer) just asked Windows to remove or reconfigure the device

What this code means

Code 21 is not really an error — it is a status you caught mid-sentence: 'Windows is removing this device.' You see it in the moment after a device is uninstalled, disabled for removal, or being reconfigured, while Windows is still tearing down its driver stack.

It only matters if it never goes away. A removal that hangs — usually because a driver stopped responding — leaves the device frozen in this state until a restart forces the process to finish.

Likely causes

How to fix it — step by step

  1. Wait and refresh

    Wait a minute and refresh Device Manager (F5 or Action → Scan for hardware changes). Most Code 21s are gone before you finish reading this page.

  2. Restart to complete the removal

    If the device is still 'being removed' after a few minutes, restart the PC. The removal completes or unwinds during boot.

  3. Power-cycle with the device disconnected

    If it persists across restarts, shut the PC down fully, remove the device (or its cable), power on, then reconnect it and let Windows detect it fresh.

If the code comes back after these steps, treat it as a hardware or service fault rather than a settings problem — that is the honest end of software troubleshooting for this code.

Is it a driver problem?

Rarely. Rarely. Code 21 is a snapshot of work in progress, not a driver fault. It only becomes a problem if the removal never finishes, and a full restart completes it.

Get the official driver or support for your device

If a fix above points you at a driver, get it from the manufacturer only:

Microsoft Support — Update drivers manually in Windows Opens support.microsoft.com

Printer, laptop or PC drivers by brand: HP · Dell · Lenovo · Acer · ASUS · Canon · Epson · Brother · Samsung printers

Related errors

Verified 2026-11-28 against: support.microsoft.com · www.windowscentral.com. Meanings follow the manufacturers' and Microsoft's published documentation; where a code's meaning depends on the exact model, the page says so.