sodcalculator

10 Tech How-To

Windows 11 Fix: Can’t Eject USB Drive?

Guide 10-51159 · Updated · Step by step

If Windows 11 won’t let you eject a USB drive, the fix is usually to close any program that’s using the drive, or to use the built-in “Eject” option in File Explorer or the taskbar. If that fails, you can force a safe removal with a few Command Prompt steps, or simply shut down the PC before unplugging (modern Windows uses write caching, so a normal shutdown flushes all data). Below we explain why this happens and give you step-by-step fixes that work in most cases.

Why Windows 11 Locks a USB Drive

Windows blocks ejection when a file on the drive is open, or when a background process (like antivirus scanning, search indexing, or a thumbnail generator) is accessing it. The operating system also holds a lock if the drive is set to “Quick removal” mode, which is the default in Windows 11 – but even then, a lock can appear if any process has a handle open. The most common culprits are:

  • File Explorer windows showing the drive’s contents
  • Media players, photo viewers, or office apps with files open from the drive
  • Antivirus or backup software scanning the drive
  • Windows Search indexing the drive
  • Command Prompt or PowerShell sessions that were used to access the drive

The lock is a safety feature: it prevents data corruption or file system damage that can happen if you yank the drive while data is being written or read.

Fix 1: Close All Programs and Try Eject Again

This is the first thing to try, because it solves most cases. Close every window that might be using the drive – not just the obvious ones. Look for:

  • File Explorer windows (even if they’re showing another folder, they might have a background handle)
  • Media players, image editors, document viewers
  • Any app that has a recent files list that includes the drive

Then try to eject again: right-click the drive in File Explorer and choose Eject, or click the USB icon in the system tray (the small arrow near the clock) and select the drive. If that works, you’re done.

Fix 2: Use the Taskbar Eject Icon (and What It Does)

Windows 11 has a dedicated eject icon in the notification area (system tray). It looks like a USB plug with a green checkmark. Click the small upward arrow to show hidden icons, then click the USB icon and select your drive. This sends a “safe to remove” command that tells Windows to flush all cached writes and release the drive. If the icon is missing, it might be hidden – drag it out of the overflow, or try the File Explorer method. Note: if the drive is locked, the icon will still show, but clicking it will give an error like “This device is currently in use.” That error is your clue to find the locking process.

Fix 3: Find and Close the Locking Process

If closing obvious apps doesn’t help, you need to find which process is holding the drive. Windows doesn’t have a built-in tool for this, but you can use the free Microsoft tool Handle (from Sysinternals) or simply restart Explorer. Here’s a simpler method that often works:

  1. Press Ctrl+Shift+Esc to open Task Manager.
  2. Under Processes, look for any app that might have accessed the drive. Right-click and choose End task.
  3. If you see Windows Explorer in the list, right-click it and choose Restart. This refreshes the shell and releases many locks.

If that doesn’t work, you can use the Sysinternals Handle tool in Command Prompt: run handle.exe -a <drive letter>: as administrator, and it will list the processes that have a handle open. Then close those processes (or kill them with taskkill /PID <pid> /F). This is more advanced, but it’s the definitive way to find the culprit.

Fix 4: Force Eject via Command Prompt (Safe Method)

If you’re comfortable with the command line, you can force a safe removal without third-party tools. This uses the built-in mountvol command, which dismounts the volume cleanly:

  1. Open Command Prompt as administrator (search “cmd”, right-click, Run as administrator).
  2. Type mountvol <drive letter>: /p (for example, mountvol E: /p) and press Enter.
  3. This dismounts the volume from the system, which flushes writes and releases handles. You can then unplug the drive safely.

If you get an error, the drive is still in use. You can also try diskpart (select volume, then remove all), but that’s riskier and should only be used if you’re sure no data is being written. The mountvol method is safer because it performs a clean dismount.

Fix 5: The Nuclear Option – Shut Down the PC

If nothing else works, you can safely unplug the drive after a full shutdown (not restart, not sleep). When you shut down Windows 11, it flushes all write caches and closes all file handles. Once the PC is completely off (no lights, fans off), you can unplug the USB drive. This is 100% safe for the data, but it’s inconvenient if you have unsaved work in other apps. It’s the last resort, but it’s better than yanking the drive while the PC is on, which risks corruption.

Why You Shouldn’t Just Pull the Drive Out

Windows 11 uses write caching by default. That means when you copy a file to a USB drive, the data might not be physically written to the flash memory immediately – it sits in a cache and is written in the background. If you unplug mid-write, you can corrupt the file, the file system, or even the drive’s partition table. The “Eject” command forces the cache to flush. Even with “Quick removal” mode (which disables write caching for the drive), there’s still a small risk of corruption if a program is mid-operation. So the eject step is not just a formality – it’s a data protection measure.

Frequently Asked Questions

Why does my USB drive say “This device is currently in use”?

That message means a program or system process has an open handle to the drive. It could be anything from a File Explorer window to a background antivirus scan. Close all programs, restart Explorer, or use the Handle tool to find the culprit.

Can I force eject a USB drive without losing data?

Yes, if you use a clean method like mountvol /p or a proper shutdown. Forcing ejection with third-party “force eject” tools can cause data loss if the drive is being written to. Always try the normal eject first.

Is it safe to unplug a USB drive when the PC is off?

Yes, completely safe. When the PC is fully shut down, there is no power to the USB port and no active writes. The data is flushed during shutdown. Just make sure the PC is really off, not in sleep or hibernate.

Why does my USB drive eject but then immediately reappear?

This usually happens when the drive is re-enumerated by Windows, often due to a power management setting. Try disabling “Allow the computer to turn off this device to save power” in Device Manager (under USB Root Hub properties). It can also happen if the drive has multiple partitions – you need to eject each partition separately.

Does Windows 11 have a “Safely Remove Hardware” icon?

Yes, it’s in the system tray, but it might be hidden. Click the upward arrow to show hidden icons, and you’ll see the USB icon. If it’s not there, you can add it to the taskbar by going to Settings > Personalization > Taskbar > System tray icons, and turning on “Windows Explorer” (or the USB icon if listed).

What if my USB drive is write-protected and can’t eject?

Write protection is a physical or logical lock that prevents writing, but it doesn’t prevent ejection. If you can’t eject, it’s still a lock issue. Check if the drive has a physical switch, and try the steps above. If the drive is corrupted, you may need to run chkdsk to fix it before you can eject cleanly.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →