How to Safely Eject Locked Drives in Windows 11

When attempting to safely remove an external storage device in Windows 11, users often encounter the “This device is currently in use” error. This guide provides direct, step-by-step methods to identify the locked files or active processes preventing ejection, terminate them safely, and disconnect your USB drive or external hard drive without risking data corruption.

1. Close Active Programs and File Explorer

The most common cause of a locked drive is an open file or directory. * Close all open files, documents, or media players that were running off the external drive. * Close every File Explorer window, even if it is not currently displaying the drive’s contents.

2. Identify and Close Locking Handles via Resource Monitor

If no obvious programs are open, a background process might still have a handle on the storage device. Use Resource Monitor to find and terminate the specific process:

  1. Press Win + R, type resmon.exe, and press Enter.
  2. Navigate to the CPU tab.
  3. Expand the Associated Handles section.
  4. In the Search Handles box, type your drive letter followed by a colon (for example, E: or F:).
  5. Review the list of processes holding a lock on the drive.
  6. Right-click the offending process and select End Process.
  7. Try ejecting your external drive again from the system tray.

3. End Background Tasks with Task Manager

Windows background processes, such as indexing or third-party backup tools, can hold a lock on storage media.

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. Under the Processes tab, look for programs that might be interacting with the drive (such as antivirus scanners, media libraries, or file sync utilities).
  3. Select the program and click End task.
  4. If Windows Explorer is unresponsive, locate it in the list, right-click it, and select Restart.

4. Take the Drive Offline in Disk Management

If you cannot locate the locking process, you can force the drive into an offline state to safely flush cached data to the disk:

  1. Right-click the Start button and select Disk Management.
  2. Locate your external disk in the lower panel (e.g., Disk 1 or Disk 2).
  3. Right-click the disk name on the left side (not the partition volume) and select Offline.
  4. Once the status shows as “Offline,” unplug the device safely.

Note: When you reconnect the drive in the future, return to Disk Management, right-click the disk, and select Online if it does not mount automatically.

5. Sign Out of Windows

If all other methods fail, signing out of your Windows user account terminates all user-level processes and safely releases file locks without requiring a full system reboot:

  1. Press Ctrl + Alt + Delete.
  2. Select Sign out.
  3. Unplug your external storage device safely before signing back in.