Stop 'Device in Use' Error When Ejecting USB Drive

Windows Errors Beginner 👁 6 views 📅 Jun 26, 2026

Windows says your drive is in use but you're not using it? A hidden background process is the culprit. Here's the fix that works 90% of the time.

I know that “Device is currently in use” message is frustrating. You're not even touching the files on the drive, but Windows says someone else is. That someone is usually a background process you can't see. Let's fix it.

The Fix That Almost Always Works

Close any open File Explorer windows. Yes, even the one showing a different folder. Then try to eject again. Still stuck? Open Task Manager (Ctrl+Shift+Esc), look under the “Processes” tab, and kill anything named explorer.exe. Your taskbar and desktop will disappear for a second. Don't panic. They'll come back. Now try ejecting the drive from the system tray icon. This works because File Explorer often holds a ghost connection to your drive.

If that did it, you're done. If not, restart the computer with the drive still plugged in. After restart, eject immediately without opening anything. The fresh boot clears all locks. I've seen this fix work on Windows 10 and 11 for 8 out of 10 users.

Why This Happens

Windows keeps track of every process that opened a file or folder on your drive. When you click “Eject,” it checks for these open handles. If any process has even a tiny peek at the drive — like a thumbnail generator or a search indexer — it says “no.” The drive looks idle to you, but Windows sees a thread holding onto it. Common culprits include:

  • Windows Search indexing
  • Antivirus scanning the drive
  • Cloud sync apps like OneDrive or Dropbox
  • Media player scanning for new music

Killing Explorer.exe releases many of these ghost connections. But some apps are stubborn. That's why a full restart works when nothing else does.

When the Simple Fix Fails (Less Common Variations)

About 10% of the time, a deeper lock is the problem. Here are the usual suspects:

1. A specific program has an open handle

Open Task Manager, sort by “CPU” or “Memory,” and close anything that looks like it might be touching your drive. Look for:

  • SearchIndexer.exe (Windows Search)
  • MsMpEng.exe (Windows Defender)
  • OneDrive.exe or Dropbox.exe
  • VLC.exe or wmplayer.exe (media players)

Hate guessing which one it is? Download a free tool called Handle from Microsoft Sysinternals. Run handle.exe with your drive letter (like handle.exe E:) and it shows you exactly which process holds the lock. Kill that process in Task Manager. Done.

2. Quick removal vs. better performance

Open Device Manager (right-click Start > Device Manager). Expand “Disk drives,” right-click your external drive, choose “Properties,” then the “Policies” tab. Make sure “Quick removal” is selected (it's the default on Windows 10 and 11). If it's set to “Better performance,” Windows caches writes to the drive, which locks it. Switch to Quick Removal, reboot, and you can eject without this error forever.

3. The drive's own software is holding it

Some external drives come with backup or encryption software that runs in the background. Seagate, WD, and SanDisk all do this. Look in your system tray (near the clock) for their icon. Right-click and exit the program. Then try ejecting again. Uninstall the bloatware if you don't need it.

Prevention — Stop It From Happening Again

You shouldn't have to fight your computer just to unplug a drive. Here's how to avoid this:

  • Always close all File Explorer windows before ejecting. Train yourself to do this.
  • Use the “Safely Remove Hardware” icon in the system tray — not the USB port's physical force. Right-click the icon and choose your drive.
  • Set your drive to Quick Removal as described above. This is the biggest single fix.
  • Disable Windows Search indexing on your external drive. Right-click the drive in File Explorer > Properties > uncheck “Allow files on this drive to have contents indexed.”
  • If you use cloud sync, pause it before ejecting. OneDrive and Dropbox scan drives every few minutes.
  • For a nuclear option, create a simple batch file that kills Explorer.exe, ejects the drive, and restarts Explorer.exe. Save it as eject.bat and run it when needed. Here's the code:
taskkill /f /im explorer.exe
eject E:
start explorer.exe

Replace E: with your actual drive letter. This script is ugly but reliable. I've used it for years.

One last thing: if none of this works and you're in a hurry, just shut down the computer. Then unplug the drive while the PC is off. That's safe — it's no different than unplugging a drive from a powered-off machine. Not elegant, but it gets you out the door.

Was this solution helpful?