💻 How to Fix “This Device Is Currently in Use” When Ejecting a USB Drive in Windows 11

If you’ve ever tried ejecting your USB drive or external hard disk only to be met with the dreaded message —

“This device is currently in use. Close any programs or windows that might be using the device, then try again.”

—you’re not alone.

Many Windows users face this frustrating problem even when they aren’t actively using the device. The message implies that something on your system — an application, service, or background process — is still accessing the drive, preventing it from being safely ejected.

In this article, we’ll walk through why this happens, how to find out which program or process is responsible, and what safe options you have to remove the device without risking data loss. We’ll use a free, official Microsoft tool called Process Explorer, part of the Sysinternals Suite, to get precise insights into what’s happening behind the scenes.

💻 How to Fix “This Device Is Currently in Use” When Ejecting a USB Drive in Windows 11

⚙️ 1. Understanding the “Device in Use” Error

When you plug in a USB flash drive, external SSD, or hard disk, Windows assigns it a drive letter (like D:, E:, or F:). Whenever a file, app, or service accesses that drive — even briefly — Windows keeps it locked to prevent other operations (like ejecting or formatting) from interfering.

So when you click “Safely Remove Hardware” or right-click → “Eject”, Windows checks whether any program is still accessing it. If it finds something, you get the warning:

“This device is currently in use.”

The tricky part? You may not see anything open, yet something is quietly running in the background.

Let’s look at the usual suspects and how to uncover them.


🧩 2. Why Windows Doesn’t Let You Eject Drives in Use

The main reason Windows prevents ejection is data integrity.

If an app is still writing or reading data from the USB drive, removing it abruptly could lead to:

  • Corrupted files or folders
  • Lost changes that weren’t saved to disk
  • File system errors that require repair tools (like chkdsk)

In older Windows versions, this risk was higher because of write caching — Windows would store temporary writes in memory and send them to the drive later. Fortunately, newer versions (Windows 10 and 11) now use Quick Removal mode by default, reducing this risk significantly.

Still, it’s always better to eject safely if possible — or at least confirm no app is using it before pulling the plug.


🧠 3. Common Causes of the Error

Before we dive into technical tools, it helps to understand what might be keeping your USB drive “in use.” Some of the most frequent reasons include:

  1. A File Explorer window is open on that drive.
    Even if you’re just browsing folders, Windows considers the drive active.
  2. Background processes (like search indexing or thumbnail caching).
    Windows Search and Explorer may be generating previews or indexing metadata.
  3. Security software scanning the drive for malware.
    Antivirus tools such as Windows Defender, Avast, or Bitdefender often trigger this.
  4. Command Prompt or PowerShell sessions running on that drive.
    If your working directory is set to D:\, the system considers it “in use.”
  5. System services such as:
    • Distributed Link Tracking Client
    • SearchIndexer.exe
    • System (NTFS metadata)
  6. File synchronization tools like OneDrive or Dropbox that automatically sync files.

Now that you know the usual culprits, let’s move on to the actual solution: identifying exactly which process is blocking your USB.


🧰 4. Download and Install Sysinternals Suite

To trace which program is keeping your drive active, we’ll use a tool called Process Explorer, part of the official Microsoft Sysinternals Suite.

You can get it here:
👉 Microsoft Sysinternals Suite (Official Page)

What is Process Explorer?

Think of it as Task Manager on steroids. It shows you every process, handle, DLL, and file that’s open on your system. It can tell you exactly which process is holding your USB drive hostage.

Once installed, open the Start Menu and type Process Explorer. If you downloaded the ZIP instead, just extract it and run procexp.exe.


🔎 5. Step-by-Step: Using Process Explorer to Identify What’s Locking Your Drive

Let’s move to the main part — detecting which process is preventing your drive from being ejected.

Take your time through these steps. It’s not complicated, but accuracy matters.

Step 1: Run as Administrator

Right-click Process Explorer and choose Run as administrator.
This ensures it has permission to inspect all processes, including system-level ones.

Step 2: Enable Full Details

In Process Explorer, go to File → Show Details for All Processes.
This restarts it with elevated privileges — an important step to see everything happening on your machine.

Step 3: Find the Drive Letter

Note the drive letter assigned to your external drive (for example, D:).

Step 4: Search for Handles

Go to Find → Find Handle or DLL (or press Ctrl + F).
In the search box, type your drive letter followed by a colon — e.g., D:
Then press Enter.

You’ll see a search window listing all processes that have open handles (connections) to that drive.

Step 5: Wait for the Scan to Complete

Be patient — even if results start appearing quickly, it’s not done yet.
Wait until the Search button becomes clickable again. That indicates the search is finished.


🧩 6. Interpreting the Results: What’s Safe to Close and What’s Not

Once the search is complete, you’ll see a list of processes referencing your drive. Let’s interpret these results carefully.

You might find entries like:

  • *cmd.exe → D:* – This means a Command Prompt window is currently open and set to that drive.
    Solution: Close that Command Prompt window.
  • explorer.exe → D:\Pictures – A File Explorer window or preview is open on that folder.
    Solution: Close all open File Explorer windows showing that drive.
  • SearchIndexer.exe – Windows Search is indexing files.
    🔄 Solution: Wait a few minutes for indexing to finish.
  • MsMpEng.exe (Windows Defender) – System antivirus is scanning your drive.
    🔄 Solution: Wait for the scan to complete.

If you find a process you recognize (like a command prompt or an app you recently used), simply close it.
Then, try ejecting the USB drive again.


🧱 7. When System Processes Are Holding the Drive

Sometimes you’ll see system-level processes like System or Service Host (svchost.exe) in the list. These can reference folders such as:

$Extend\$RmMetadata

These are part of NTFS internal metadata — essential housekeeping files Windows maintains for the drive’s file system.

Unfortunately, you can’t (and shouldn’t) stop these. They are normal and typically temporary. Here’s how to deal with them:

  • Wait a bit: Windows often releases these handles within a few minutes after background activity ends.
  • Stop search or sync: Temporarily disable indexing or syncing if it persists.
  • As a last resort: Safely shut down your computer before removing the drive (more on this below).

🔌 8. How to Eject the Drive Safely (Even If It’s Still “In Use”)

If you’ve closed everything possible and Windows still refuses to eject, you have two safe options.

Option 1: Shut Down Your PC

This is the always safe but inconvenient method.

When you shut down, Windows automatically closes all programs and flushes pending writes.
After your PC turns off, you can safely unplug the USB drive.

Option 2: Unplug Manually (the Pragmatic Way)

If the error persists but you’re certain:

  • No files are open from the USB drive, and
  • You’re not copying or writing large files,

…it’s usually safe to unplug the drive manually.

Here’s why 👇


⚡ 9. Windows 10 & 11 “Quick Removal” Mode: Why It’s Usually Safe

Starting with Windows 10 (build 1809) and continuing in Windows 11, Microsoft changed the default USB policy from Better Performance to Quick Removal.

This means:

  • Data is written immediately to the drive (no delayed caching).
  • The risk of data corruption is much lower when you unplug without ejecting.

In other words, unless the drive is actively transferring files, you can usually unplug it without damage.

To check your USB policy:

  1. Open Device Manager.
  2. Find your external drive under Disk Drives.
  3. Right-click → Properties → Policies tab.
  4. Ensure Quick Removal is selected (it usually is by default).

That said, it’s still wise to keep backups — no method is 100% risk-free.


❓ 10. FAQ: Common Questions About Safe Ejecting

Q1. Why does Windows say “device in use” when I’m not using it?
Because background processes like antivirus scans or indexing are accessing it. Use Process Explorer to identify them.

Q2. Can I use third-party “unlocker” tools?
Some tools can forcibly close handles, but they can also crash or corrupt the system. It’s safer to use Microsoft’s own Sysinternals tools.

Q3. What if my USB light keeps blinking?
That means data is being read or written. Wait until it stops before unplugging.

Q4. Is it okay to just pull the drive out?
Usually yes, if Quick Removal mode is on and you’re not copying files — but always have backups.

Q5. How do I stop Windows from indexing external drives?
Right-click the drive → Properties → General tab → Uncheck “Allow files on this drive to have contents indexed.”

Q6. Does antivirus scanning affect USB ejection?
Yes. Antivirus tools may lock the drive temporarily. Wait until the scan completes or pause real-time protection briefly (not recommended unless you’re sure).


🏁 11. Final Thoughts

If you’ve followed all the steps, you now understand not only how to identify which process is holding your USB drive but also how to safely eject it — even when Windows insists it’s “in use.”

To recap:

  1. Use Process Explorer to search for handles tied to your USB drive letter.
  2. Close the offending apps or wait for system processes to release them.
  3. If necessary, shut down or carefully unplug under Quick Removal policy.

And remember — always back up your important files before disconnecting any external device.

Most of the time, the warning is Windows being overly cautious. As long as you ensure no files are open and no copy operations are running, unplugging manually is perfectly fine in Windows 10 and 11.


⚠️ Disclaimer

The steps provided are intended for Windows 10 and Windows 11 users and rely on official Microsoft tools.
While Quick Removal mode makes USB disconnection much safer, there’s always a small risk of data loss if a background write operation is still active.
Always maintain a backup of critical data before performing any disk operations.

Official Tool:
👉 Microsoft Sysinternals Suite – Process Explorer


#Windows11 #USB #Sysinternals #ProcessExplorer #DeviceInUse #DataSafety #TechGuide

Visited 49 times, 7 visit(s) today

Meera Joshi

Meera Joshi

Meera is a browser technology analyst with a background in QA testing for web applications. She writes detailed tutorials on Chrome, Firefox, Edge, and experimental browsers, covering privacy tweaks, extension reviews, and performance testing. Her aim is to make browsing faster and safer for all.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.