Device Manager Code 21 — Windows Is Removing This Device
| Code | Code 21 |
|---|---|
| Applies to | Windows device (any brand) |
| Severity | User-fixable |
| Most common cause | You (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
- You (or an installer) just asked Windows to remove or reconfigure the device
- A driver update is mid-swap when you opened Device Manager
- Windows got stuck mid-removal because the device or its driver stopped responding
How to fix it — step by step
- 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.
- 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.
- 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
- Code 14 — This device cannot work properly until you restart your computer — a driver change is waiting for a reboot to take effect.
- Code 44 — An application or service has shut down this hardware device — software switched it off; it did not fail.
- Code 47 — Windows cannot use this device because it has been prepared for safe removal but has not been removed — it is parked after an eject.
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.