External Drive Won’t Eject Safely: 6 Solutions That Work
You’ve been working on an important project, copying files back and forth from your external drive, and you’re ready to pack up and go. You click “Safely Remove Hardware” or drag to the trash on your Mac, and you get hit with that infuriating message: This device is currently in use. But you’ve already closed every file. Every window is shut. Nothing is obviously using the drive.
This is one of the most common and most annoying issues in everyday computing. Yanking the drive out without safely ejecting it risks corrupting your data, damaging the file system, or even bricking the drive entirely. I’ve personally seen a colleague lose an entire photo shoot because they pulled a drive that “wasn’t doing anything.” The file allocation table got scrambled, and recovery software could only salvage about 60% of the files.
The good news is that this problem almost always has a solvable cause. Here are six practical solutions that actually work, covering both Windows and Mac, from the gentlest fix to the nuclear option.
1. Identify and Close the Process Locking Your Drive
Most of the time, some application or background process still has a file handle open on your external drive. You might not see it, but your operating system does. Finding and closing that process is the cleanest fix.
On Windows: Use Resource Monitor
Windows has a built-in tool that most people don’t know about. Open Resource Monitor by pressing Win + R, typing resmon, and hitting Enter. Click the CPU tab, then expand Associated Handles in the lower section.
In the search box, type the drive letter of your external drive (for example, E:). Resource Monitor will show you every process that has a handle on that drive. You’ll often find culprits like Windows Search indexing, antivirus scanners, cloud sync apps like Dropbox or OneDrive, or even Windows Explorer itself. Right-click the offending process and select End Process, then try ejecting again.
On Mac: Use the lsof Command
Open Terminal (you’ll find it in Applications > Utilities) and type:
lsof +D /Volumes/YourDriveName
Replace “YourDriveName” with the actual name of your drive. This command lists every open file on that volume and the process using it. Once you identify the process, you can quit the application normally or use kill followed by the process ID (PID) to force it closed.
This method works about 70% of the time in my experience. It’s always where I start.
2. Close All Explorer/Finder Windows Pointing to the Drive
This one sounds almost too simple, but it catches people constantly. If you have any File Explorer window (Windows) or Finder window (Mac) open that’s browsing the external drive, or even a subfolder on it, the OS considers the drive “in use.”
On Windows, close every Explorer window, or at minimum navigate each one away from the external drive to a local folder like Desktop or Documents. On Mac, close all Finder windows showing the drive’s contents. You can also try opening a new Finder window pointing to your home folder before attempting the eject.
I’d also check for any open Save/Open dialog boxes in applications. If you had a “Save As” dialog pointing to your external drive three hours ago and the app is still running, that file dialog might still hold a reference to the drive. Close the application entirely and try again.
3. Use the Windows “Safely Remove Hardware” Troubleshooter
Windows 10 and 11 have a lesser-known approach that sometimes works when the standard tray icon method fails.
Open Settings > Bluetooth & devices > Devices (on Windows 11) or Settings > Devices (on Windows 10). Find your external drive in the list, click on it, and select Remove device. This takes a slightly different code path than the system tray eject and can sometimes succeed where the tray icon fails.
Another option: open Disk Management (right-click the Start button, select Disk Management), find your external drive, right-click the disk label on the left side (not the partition), and choose Offline. This forces Windows to release the disk. You can then safely unplug it. Just remember to set it back to Online the next time you connect it.
4. Force Eject on Mac Using Terminal or Disk Utility
Mac users have a couple of escalation paths when the normal eject fails.
Disk Utility Method
Open Disk Utility (Applications > Utilities > Disk Utility), select your external drive from the sidebar, and click Unmount. If that doesn’t work, try the Eject button instead. These two operations are technically different. Unmounting releases the file system while ejecting powers down the device. Sometimes one works when the other won’t.
Terminal Method
For a more forceful approach, open Terminal and type:
diskutil unmountDisk force /dev/diskX
Replace diskX with your actual disk identifier. You can find it by running diskutil list first and looking for your external drive. The force flag tells macOS to unmount the disk even if processes are using it. This is my go-to when Finder’s eject button gives me the silent treatment.
A word of caution: force unmounting while files are actively being written can still cause data loss. Use this only when you’re confident no active transfers are happening.
5. Stop Background Services That Lock External Drives
Several background services are notorious for grabbing onto external drives and refusing to let go. Knowing the usual suspects saves you a lot of detective work.
Windows Search Indexing
Windows automatically tries to index external drives for faster searching. Open Indexing Options from the Control Panel, click Modify, and uncheck your external drive. This prevents the indexing service from scanning the drive in the future. For the immediate problem, you can temporarily stop the Windows Search service by opening an elevated Command Prompt and typing net stop WSearch. Eject your drive, then restart it with net start WSearch.
Antivirus Software
Real-time antivirus scanners, including Windows Defender, frequently scan files on external drives the moment they’re accessed. If your AV is running a scan on the drive, ejection will fail. Temporarily pause real-time protection, eject the drive, then re-enable it. Norton, Bitdefender, and Malwarebytes are all known to hold file handles open during scans.
Cloud Sync Services
Dropbox, Google Drive, OneDrive, and similar services will lock files they’re syncing. If you’ve stored any synced folders on your external drive (or if the service is simply monitoring it), quit the sync client before ejecting. On Mac, also check for Spotlight indexing. You can add your external drive to the Spotlight privacy list in System Settings > Siri & Spotlight > Spotlight Privacy to prevent future issues.
Thumbnail and Preview Generation
Both Windows and Mac generate thumbnail previews for image and video files. If your drive contains a folder full of photos or videos, the OS may be churning through thumbnails in the background. On Windows, you can disable thumbnail generation for external drives through Group Policy or by switching File Explorer to “List” or “Details” view before navigating to the drive.
6. The Last Resort: Log Out, Restart, or Shut Down
Sometimes you’ve tried everything and the drive still won’t eject. When you’re out of patience, logging out of your user account (not locking, actually logging out) will close all user-level processes and release file handles. You can then log back in and eject the drive cleanly.
If that fails, a full restart or shutdown will definitively release the drive. Wait for the computer to fully power off before unplugging the drive. This is the safest version of the “just pull it out” approach because the operating system flushes all write caches and closes all file handles during the shutdown sequence.
I know restarting feels like overkill, but it’s infinitely better than corrupting your data. On a modern SSD-equipped computer, you’ll be back up and running in under 30 seconds.
Prevention: Stop This From Happening in the Future
A few simple habits will dramatically reduce how often you run into ejection problems.
- Close files before you close apps. Some applications (like Adobe Premiere, Lightroom, and even Excel) maintain background connections to recently opened files even after you close the file itself. Quit the application entirely.
- Disable indexing on external drives. On both Windows and Mac, preventing search indexing on removable media eliminates one of the most common causes of failed ejections.
- Use the “Better Performance” vs. “Quick Removal” policy on Windows. In Device Manager, find your external drive under Disk Drives, open its Properties, go to the Policies tab, and select Quick removal. This disables write caching and makes the drive safer to remove, though at a slight performance cost during file transfers.
- Eject before closing your laptop lid. Sleep and hibernation can create stale file handles that persist after wake, making ejection harder.
- Consider drives with eject buttons. Some external enclosures, like certain models from StarTech and Sabrent, include a physical eject mechanism that initiates a safe removal at the hardware level.
Frequently Asked Questions
Can I just unplug an external drive without ejecting it?
Technically, you can, but you’re gambling with your data every time. Modern operating systems use write caching, meaning data you think has been written to the drive may still be sitting in a memory buffer waiting to be flushed. Pulling the drive mid-cache-flush can corrupt files, damage the file system’s directory structure, or make the entire drive unreadable. If you’ve enabled the “Quick removal” policy on Windows, the risk is lower, but safe ejection is still the recommended practice.
Why does my drive say it’s in use when nothing is open?
Background processes are almost always the culprit. Windows Search indexing, antivirus scans, cloud sync services, thumbnail generators, and even shell extensions (like those installed by archive utilities or version control software) can hold invisible file handles open. Use Resource Monitor on Windows or the lsof command on Mac to identify exactly which process is holding on. You’ll often find it’s something you forgot was running or didn’t know was installed.
Does this problem happen more with USB 3.0 or USB-C drives?
The connection type doesn’t directly cause ejection failures. However, faster interfaces like USB 3.0, USB 3.2, and Thunderbolt transfer data more quickly, which means large file operations complete faster and you might attempt ejection sooner after a transfer. The real variable is the drive’s file system (NTFS, exFAT, HFS+, APFS) and whether write caching is enabled. exFAT drives, which are commonly used for cross-platform compatibility, tend to have fewer ejection issues because both Windows and Mac handle them with simpler caching strategies.
Will force ejecting damage my external SSD?
Force ejecting won’t physically damage a modern external SSD. SSDs don’t have spinning platters or read/write heads that can crash. The risk is entirely to your data and the drive’s file system. If no files were actively being written at the moment of removal, you’ll almost certainly be fine. The danger comes when you interrupt an active write operation, which can leave partially written files or corrupt the file allocation table. Always check that no transfers are in progress before force ejecting.
Final Thoughts
The “device is currently in use” error is annoying, but it’s your operating system trying to protect your data. Working through these six solutions in order, from identifying the locking process to restarting as a last resort, will get your drive safely disconnected every time.
My personal recommendation: start with Resource Monitor or lsof to identify the culprit, and then set up your system to prevent the issue going forward by disabling drive indexing and enabling the Quick removal policy on Windows. These two preventive steps alone will eliminate most future ejection headaches. Your data is worth the extra 30 seconds it takes to do this right.
