Inside the lab follow MDrepairs on YouTube, TikTok & Instagram - visit our YouTube channel ↗

Data Recovery Guide

How to Properly Eject an External Drive (and Why It Matters)

Updated November 18, 2026
In this article

To properly eject an external drive, close any open files on it, then use your operating system's safe-removal feature before unplugging. This flushes the write cache and finishes pending writes so the file system isn't left corrupted.

  1. Windows: click the "Safely Remove Hardware" icon in the system tray and pick the drive, or right-click it in File Explorer and choose Eject.
  2. Mac: drag the drive to the Trash (it becomes an Eject icon), or click the eject arrow next to it in Finder.
  3. Wait for the "safe to remove" confirmation, then physically unplug it.

Already pulled it and the drive won't mount? Stop using it and see your options for external hard drive data recovery.

Someone pulls a USB drive out of their computer without ejecting it. If this happened to you, our guide on external hard drives not showing up covers the fix. File system damage can lead to a need for data recovery.

The thing is, properly ejecting an external drive takes about three seconds. That's it. Three seconds to avoid a potentially catastrophic data loss event. And in this guide, we'll explain exactly why, how to do it on every operating system, and what to do if you've already screwed up.

We're MDrepairs, a professional data recovery lab in New Jersey. If you need to move data to a new computer via an external drive, proper ejection is critical.

Why You Need to Eject (The Technical Explanation)

When you copy a file to an external drive, Windows and macOS don't always write the data immediately. They use something called write caching, which means the operating system temporarily stores data in memory (RAM) and writes it to the drive in the background, in batches, when it's efficient to do so. This makes things faster because writing to RAM is almost instant, while writing to a physical drive takes real time.

The problem? If you yank the drive out while there's still cached data waiting to be written, that data never makes it to the drive. It just vanishes. And if that cached data included file system metadata (the table of contents that tells the drive where every file is stored), you can corrupt the entire file system structure.

What "Safely Remove" Actually Does

When you click "Safely Remove Hardware" (Windows) or hit the eject button (Mac), the operating system does three things:

  1. Flushes the write cache. Any data sitting in RAM that hasn't been written to the drive yet gets written immediately. This ensures every file is complete and intact.
  2. Closes all open file handles. Any programs or system processes that have files open on the drive get told to release them. This prevents partial writes.
  3. Signals the drive that it's about to be disconnected. This lets the drive's own firmware finish any pending operations (like relocating data from bad sectors or updating its internal log).

Only after all three steps complete does the system tell you it's safe to remove the drive. That "Safe to Remove Hardware" notification isn't just being polite. It's confirming that every pending operation is done.

The write cache is the key issue. On Windows, write caching for external drives is actually disabled by default (since Windows 10 version 1809). This means if you're running a modern Windows machine and you haven't changed the caching settings, yanking a USB drive after all file transfers are complete is less risky than it used to be. But "less risky" isn't "safe." There are still file handles, journaling operations, and drive firmware tasks that can go wrong. Always eject properly.

The File System Journal

File systems such as NTFS on Windows, HFS+ Journaled on Mac, and ext4 on Linux use journaling. APFS uses copy-on-write metadata and checkpoints instead. Think of a journal as a transaction log. Before the file system makes any change (creating a file, moving a file, renaming a folder), it writes the intended change to the journal first. Then it makes the actual change. Then it marks the journal entry as complete.

If you pull the drive out in the middle of a journaled operation, the file system is in an inconsistent state. The journal says one thing, the actual disk says another. Sometimes the file system can fix this on the next mount by replaying or rolling back journal entries. Sometimes it can't, and the entire volume becomes unreadable.

What Actually Happens When You Don't Eject

Let's get specific about the different failure scenarios. Not every improper ejection causes damage, but when it does, these are the things that can go wrong:

Scenario 1: Nothing (You Got Lucky)

If there's no write cache pending, no files are open on the drive, and the file system journal is clean, pulling the drive out without ejecting won't cause any damage. This is why most people think ejecting is unnecessary. They've done it hundreds of times with no consequences. But they're playing a probability game, and eventually the odds catch up.

Scenario 2: Corrupted Files

If you pull the drive while a file is being written (even if the progress bar finished, the cache might still be writing), that file will be corrupted. It might show 0 bytes. It might have the right file size but be partially garbage data. It might not open at all. Usually it's just the one file, and everything else on the drive is fine.

Scenario 3: File System Corruption

This is the bad one. If the file system metadata gets corrupted (the Master File Table on NTFS, the catalog file on HFS+/APFS), the drive can become unreadable. You'll get errors like:

  • "You need to format the disk before you can use it"
  • "The disk in drive E: is not formatted"
  • The drive shows as "RAW" in Disk Management
  • "The file or directory is corrupted and unreadable"
  • Drive mounts but shows 0 files (even though it's clearly not empty)

In this scenario, your data is almost certainly still on the drive. The actual files haven't been deleted or overwritten. But the operating system can't read the file system structure, so it has no idea where any of the files are. It's like ripping out the table of contents from a book: all the chapters are still there, but you can't find them.

Scenario 4: Partition Table Damage

In rare cases, the partition table itself can get corrupted. The partition table is the very first thing on a drive that tells the operating system how the drive is divided up and what file system each partition uses. If this gets damaged, the operating system won't even recognize that there's a valid partition on the drive. It'll show the drive as "unallocated" or "not initialized." Data recovery is still possible, but it requires rebuilding the partition table manually.

The worst time to pull a drive without ejecting: While a file transfer is actively in progress. If you're copying a large file (or many files) and you yank the cable before the transfer completes, you're almost guaranteed to corrupt something. The file being transferred will be incomplete, and there's a high probability of file system damage.

How to Safely Eject on Windows

Windows gives you several ways to eject an external drive. Here are all of them, from quickest to most thorough:

Method 1: System Tray (Fastest)

1 Click the USB Icon in the System Tray

Look for the small USB drive icon in the bottom-right corner of your screen (in the system tray, next to the clock). You might need to click the small arrow to show hidden icons. Click the USB icon, then click "Eject [Drive Name]".

2 Wait for Confirmation

Windows will display a notification saying "Safe to Remove Hardware". Only remove the drive after you see this message. If you get a warning that the drive is still in use, see the troubleshooting section below.

Method 2: File Explorer

Right-Click in File Explorer

Open File Explorer (Win + E). Find your external drive in the left sidebar under "This PC." Right-click on it and select "Eject". The drive will disappear from File Explorer once it's safe to remove.

Method 3: Settings (Windows 10/11)

Settings App

Go to Settings > Devices > Connected devices (Windows 10) or Settings > Bluetooth & devices > Devices (Windows 11). Find your drive in the list and click "Remove device". This is the slowest method but guarantees a clean disconnection.

Method 4: Disk Management (Nuclear Option)

Take the Drive Offline

Right-click the Start button and select "Disk Management." Find your external drive (be careful to identify it correctly). Right-click the disk label (not the partition) and select "Offline." This forces all processes to release the drive. You can then safely unplug it.

How to Safely Eject on macOS

macOS is more aggressive about requiring ejection than Windows. If you pull a drive without ejecting on a Mac, you'll always get the "Disk Not Ejected Properly" warning, and macOS treats it as a potential corruption event.

Method 1: Finder Sidebar

Click the Eject Icon

Open Finder. In the left sidebar, find your external drive. Click the eject icon (small upward arrow) next to the drive name. When the drive disappears from the sidebar, it's safe to unplug.

Method 2: Desktop

Right-Click on Desktop

If your drive icon is on the desktop, right-click it and select "Eject [Drive Name]". Or you can drag it to the Trash (which changes to an Eject icon when you drag a drive over it). Don't worry, dragging a drive to the Trash ejects it; it doesn't delete your data.

Method 3: Disk Utility

Unmount in Disk Utility

Open Disk Utility (Applications > Utilities > Disk Utility). Select your external drive and click "Unmount" for individual partitions or "Eject" for the entire physical drive. This is the most thorough method on Mac.

Method 3: Terminal

Command Line Eject

Open Terminal and type: diskutil eject /Volumes/DriveName

Replace "DriveName" with the actual name of your drive. This is the fastest method if you're comfortable with the command line, and it's the same thing Finder does behind the scenes.

How to Safely Eject on Linux

Linux uses the term "unmount" rather than "eject," but the concept is identical.

GUI Method

In your file manager (Nautilus, Thunar, Dolphin, etc.), click the eject/unmount icon next to the drive in the sidebar. Wait for it to disappear before unplugging.

Terminal Method

Run: sudo umount /dev/sdX1 (replace sdX1 with your actual partition, e.g., sdb1)

After unmounting every mounted partition on that device, run: sudo udisksctl power-off -b /dev/sdX and wait for it to succeed before physical removal.

What to Do When the Drive Won't Eject

This is the most frustrating situation: you try to eject the drive and Windows says "This device is currently in use" or Mac says the drive is busy. Here's how to handle it without just yanking the cable and hoping for the best.

Step 1: Close All Open Files

A drive may refuse to eject while you or a program has a file open on it. Close all documents, photos, videos, and applications that might be accessing the drive. Close any File Explorer or Finder windows showing the drive's contents. Close your media player if you were playing music or videos from the drive.

Step 2: Close Background Programs

Some programs access external drives in the background:

  • Cloud sync tools (Dropbox, OneDrive, Google Drive) might be indexing or syncing files from the drive
  • Antivirus software might be scanning the drive
  • Thumbnail generators (Windows Explorer creates thumbs.db files, Preview on Mac generates thumbnails)
  • Search indexers (Windows Search, Spotlight on Mac) might be indexing the drive
  • Backup software might have the drive listed as a source or destination

Close or temporarily disable these programs, then try ejecting again.

Step 3: Use Task Manager (Windows)

If you can't figure out what's holding the drive, open Task Manager (Ctrl+Shift+Esc) and look for processes that might be accessing the drive. Sort by "Disk" activity. You can also try logging out and back in, which closes all user processes and releases all file handles.

Step 4: Wait, Then Try Again

Sometimes a process is just temporarily accessing the drive (like an antivirus scan that'll finish in a few seconds). Wait 30 seconds and try ejecting again. Patience beats force.

Step 5: Restart the Computer

If nothing else works, a restart is the cleanest way to release all handles. Before the computer restarts, it'll flush all write caches and close all file handles. The drive is safe to remove after the computer fully shuts down (before it boots back up).

Never use "End Process" on system processes to force-free a drive. Killing system processes like explorer.exe or csrss.exe can crash your system and potentially make the situation worse. Just restart the computer.

Types of Damage From Improper Ejection

Not all ejection-related damage is the same. The table lists types of damage:

Damage Type Severity Recovery Difficulty
Single file corruption Low Easy. The one file is damaged; everything else is fine.
File system journal corruption Medium Usually self-repairs on next mount. CHKDSK or fsck can fix it.
Master File Table (MFT) corruption High Drive shows as RAW. Professional tools can rebuild it.
Partition table damage High Drive shows as unallocated. TestDisk can often fix this.
Drive firmware corruption Very High Rare but serious. Drive may not be detected at all. Needs professional recovery.

The Cumulative Effect

Here's something people don't think about: the damage from improper ejection can be cumulative. Each time you yank the drive at a bad moment, you might cause a tiny bit of file system inconsistency that doesn't cause visible problems. But those inconsistencies add up. After dozens or hundreds of improper ejections, the file system can become so fragmented and inconsistent that it finally breaks all at once.

How to Fix a Drive That Got Corrupted

Already made the mistake? If this is your only copy, make a full drive image or recover files to another drive before repairs. Disk Drill's byte-to-byte backup is one option for a drive without physical symptoms. Once your files are saved, try the repairs below if you want to reuse the drive.

Fix 1: Try Plugging It Back In

Seriously. Sometimes the file system just needs to finish what it was doing. Plug the drive back into the same computer and give it a minute. The file system's recovery mechanisms might restore a consistent state automatically. You might see "Scanning and repairing drive" on Windows, or the drive might take a few extra seconds to mount on Mac. If it comes up normally and your files are there, you got lucky.

Fix 2: Run CHKDSK (Windows)

Check Disk for Errors

Open Command Prompt as Administrator and run: chkdsk E: /f (replace E: with your drive letter). This scans the file system for inconsistencies and attempts to fix them. The /f flag tells CHKDSK to fix errors it finds. On a drive without physical symptoms and with files backed up, /r adds a bad-sector check: chkdsk E: /f /r

Fix 3: Run First Aid (macOS)

Disk Utility First Aid

Open Disk Utility, select the external drive, and click "First Aid". This runs the Mac equivalent of CHKDSK. It'll check the file system structure and attempt to repair any issues.

Fix 4: Use TestDisk (Cross-Platform)

Rebuild Partition Table

If the drive shows as "unallocated" or has no recognized partitions, TestDisk can scan for lost partitions and rebuild the partition table. It's free, open-source, and works on Windows, Mac, and Linux.

Do NOT format the drive. If Windows says "You need to format the disk before you can use it," click Cancel. Formatting will overwrite the file system structures that recovery tools need. The drive probably just has corrupted metadata that can be repaired. Formatting would make recovery much harder.

Fix 5: Professional Data Recovery

If none of the above works, or if you're not comfortable running disk repair tools on a drive with important data, bring it to a professional. At MDrepairs, we use specialized tools that can rebuild corrupted file systems, recover data from RAW drives, and extract files even when the partition table is completely gone. For corruption caused by improper ejection, we have a very high success rate because the actual data is almost always intact. It's just the file system structure that's damaged.

Common Myths About Ejecting Drives

Myth 1: "Windows 10+ doesn't need safe ejection anymore"

This myth came from a real change Microsoft made: starting with Windows 10 version 1809, the default removal policy for external USB devices was changed from "Better Performance" (write caching on) to "Quick Removal" (write caching off). This means Windows doesn't cache writes to external drives by default anymore, which reduces the risk of data loss from improper ejection.

But that doesn't mean ejecting is unnecessary. Even with write caching off, there are still scenarios where data can be corrupted: open file handles, background processes accessing the drive, file system journal operations, and NTFS metadata updates. Microsoft's own documentation still recommends using "Safely Remove Hardware."

Myth 2: "If the activity light stops blinking, it's safe to pull"

The activity light on external drives shows physical read/write activity. But write-cached data sits in your computer's RAM, not on the drive. The light can stop blinking (meaning the drive isn't actively reading or writing) while there's still cached data waiting to be flushed. Additionally, the light might be off while the file system journal is being updated in memory before being committed to disk.

Myth 3: "SSDs don't need safe ejection because they have no moving parts"

The physical/mechanical argument is irrelevant. Safe ejection isn't about protecting spinning platters or moving heads. It's about ensuring the file system metadata is consistent and all cached data is written. SSDs use the same file systems (NTFS, APFS, exFAT) as HDDs, and those file systems are equally vulnerable to corruption from improper ejection. An external SSD needs to be ejected just as properly as an external HDD.

Myth 4: "exFAT drives don't need ejection because there's no journaling"

exFAT (the file system most commonly used on USB flash drives and SD cards) doesn't have journaling, which means there's no journal to corrupt. But exFAT still has allocation tables and directory entries that can be damaged by improper ejection. exFAT lacks both a journal and APFS-style metadata checkpoints, so interrupted writes can leave its file table inconsistent.

Best Practices for External Drive Care

Properly ejecting is just one part of keeping your external drives healthy. Here are the full best practices we recommend to everyone:

Always Eject Before Removing

This should be automatic, like buckling your seatbelt. Every single time. No exceptions. Three seconds of clicking beats hours of data recovery.

Don't Disconnect During Transfers

This seems obvious but it happens. Someone starts a large file copy, gets impatient, and pulls the drive thinking "I'll just copy that file again later." Now the file is corrupted and possibly the file system too.

Use Quality Cables

Cheap USB cables are the silent killer of external drives. A cable that has a loose connection can momentarily disconnect and reconnect the drive, which is the same as an improper ejection. If your external drive keeps disconnecting and reconnecting (you hear the USB disconnect sound), replace the cable immediately.

Don't Use USB Hubs for Drive-Heavy Work

USB hubs share bandwidth and power among connected devices. If you're transferring large amounts of data to an external drive, connect it directly to your computer's USB port, not through a hub. Power drops through hubs can cause mid-transfer disconnections.

Keep Backups

An external drive is a backup device, not an archival device. If you're storing your only copy of important data on a single external drive, you're one drop, one cable failure, or one improper ejection away from losing everything. Follow the 3-2-1 backup rule: three copies, two types of media, one offsite.

Run Drive Health Checks Periodically

Use CrystalDiskInfo (Windows, free) or DriveDx (Mac) to check the SMART status of your external drives. These tools can warn you about developing problems before they become data-loss events. Check every few months, or any time you notice the drive acting slow or behaving oddly.

Frequently Asked Questions

What happens if I accidentally pull out a USB drive without ejecting?

Usually nothing. Most of the time, if no files were being written at that exact moment, the drive will be fine. But there's always a chance of file system corruption, especially if background processes were accessing the drive. Plug the drive back in and check that your files are intact. If everything looks normal, you got lucky. If the drive won't mount or asks to be formatted, don't format it. Save a full drive image or recover files to another drive before trying CHKDSK (Windows) or First Aid (Mac).

Is it safe to pull out a USB drive if the light isn't blinking?

Not necessarily. The activity light shows physical drive activity, but write-cached data in RAM won't trigger the light. The file system might also be mid-journal-update without the light showing activity. Always use the software eject function regardless of what the activity light is doing.

Does Windows 10/11 really make safe ejection unnecessary?

No. Microsoft changed the default write caching policy for USB drives in 2018, which reduced one specific risk. But write caching was never the only reason to eject. Open file handles, file system metadata updates, and background process access can all cause corruption during improper ejection. Microsoft still recommends using "Safely Remove Hardware."

My drive shows as "RAW" after I pulled it out. Is my data gone?

Almost certainly not. "RAW" means Windows can't read the file system metadata, but the actual files are usually still there. Don't format the drive. A RAW volume cannot be repaired with chkdsk /f; recover files to another drive first. If that doesn't work, professional data recovery can almost always get the files back from a RAW drive because the data itself hasn't been overwritten.

Do I need to eject a USB flash drive the same way as a hard drive?

Yes. USB flash drives use the same file systems (usually exFAT or FAT32) and are vulnerable to the same corruption issues. Actually, flash drives are arguably more important to eject properly because exFAT and FAT32 don't have journaling, meaning there's no automatic recovery mechanism if the file system gets corrupted.

Can improper ejection physically damage my drive?

For HDDs, it's theoretically possible. If the drive is writing data and you suddenly cut power by removing it, the read/write heads might not park properly. Modern drives have emergency head parking mechanisms that use the spinning platters' inertia to park the heads, but it's not something you want to test regularly. For SSDs and flash drives, there's no physical damage risk from sudden disconnection, only logical/file system damage.

Using diskutil eject /Volumes on macOS

On macOS, diskutil eject /Volumes/Name is the Terminal version of ejecting a mounted external drive from Finder. It tells macOS to unmount the file system, flush pending writes, and then eject the whole removable device when possible. The command is useful when Finder is not showing the eject button, a drive is mounted but hard to select, or you need a precise command for a named volume.

The path matters. Mounted volumes live under /Volumes, so a drive named Backup would usually be ejected with diskutil eject /Volumes/Backup. If the name contains spaces, quote the path: diskutil eject "/Volumes/My Backup". You can list mounted volumes with ls /Volumes, or use diskutil list to see disk identifiers such as disk4 and volume identifiers such as disk4s1.

For a normal external drive, eject the volume path or the whole disk identifier. For example, diskutil eject /Volumes/Backup or diskutil eject disk4. If macOS says the disk is in use, close open files, quit apps that may be indexing or backing up, and wait for copy operations to finish. Time Machine, Photos, Finder previews, Spotlight, antivirus tools, and database files can all keep a handle open.

A forced eject should be the last step, not the first. If a drive contains important data and it is hanging during eject, clicking, repeatedly disconnecting, or causing macOS to freeze, the problem may be storage failure rather than a normal busy volume. Pulling the cable during writes can damage the file system. On a failing hard drive or SSD, repeated mount and eject attempts can also worsen read instability.

If the drive no longer mounts after an eject problem, stop testing it on multiple computers. MDRepairs handles external drive data recovery from our New Jersey lab with nationwide mail-in service, a flat $100 diagnostic, and a free phone consult to decide whether software steps are still reasonable.

What is the correct diskutil eject command for a volume path?

Use diskutil eject /Volumes/VolumeName. If the name has spaces, put the path in quotes, for example diskutil eject "/Volumes/My Backup". You can confirm the exact mounted name with ls /Volumes. You can also eject the whole device by using its disk identifier from diskutil list.

Is diskutil eject safer than unplugging the drive?

Yes. diskutil eject asks macOS to close the file system cleanly and flush writes before the device is removed. Unplugging without ejecting can leave directory records, allocation tables, or journal data unfinished. If the command hangs because the drive is failing, stop repeated attempts and protect the data before further troubleshooting.

Related services

How MDrepairs can help

Real cases like this come through our New Jersey lab every week. If you are dealing with one now, start here.

Lost your data?
Let's assess your options.

Estimated turnaround: 4–6 weeks; timing may vary by case. Start with a free initial quote. The $100 lab diagnostic is credited on success; diagnostic and approved parts charges apply on failure.

Split the cost of your recovery with Affirm. Explore financing Subject to eligibility.

Devices recovered at our lab

These rows come from BenchKey, the ticket system we built for our own shop. Customer names, contact details and descriptions are left out.

Gloved hand holding a hard drive head stack at our Lincroft lab
A gloved hand holds a hard drive head stack at our Lincroft lab.
4.6 · 345 Google reviews$100 diagnostic, credited toward a successful recovery
Start your mail-in recovery