Eject your external hard drive through your operating system before unplugging it
Pulling an external hard drive out of your computer while it is still reading or writing data can corrupt files, damage the drive's file system, or cause data loss. The safe way is to tell your operating system the drive is about to be removed — a process called ejecting — which lets the system finish any pending operations and close the connection cleanly. On Windows, this takes about 30 seconds. On Mac, it takes about 10 seconds. On Linux, the steps vary by distribution.
The reason this matters: your computer does not write to a drive the moment you save a file. It queues up write operations and batches them together for speed. If you unplug before that queue empties, the drive loses data that your computer thought it had already saved. Ejecting flushes that queue and tells the drive it is safe to power down.
Key Takeaways
- Always eject through your operating system before physically unplugging the drive, even if the drive appears inactive.
- On Windows, right-click the drive in File Explorer and select "Eject" from the menu, then wait for the confirmation message.
- On Mac, drag the drive icon to the Trash, or select it and press Command+E, then wait for the icon to disappear from the desktop.
- If your computer says the drive is in use, close all open files from that drive and any programs accessing it, then try ejecting again.
- Never force-eject a drive that is actively copying or transferring files — wait for the transfer to finish first.
Ejecting on Windows
Open File Explorer and locate your external hard drive in the left sidebar or in the main window under "This PC." Right-click the drive name and select "Eject" from the menu that appears. Your computer will then close all connections to the drive and display a notification saying it is safe to remove the hardware.
Wait for that notification before unplugging. If you do not see the eject option, the drive may be in use by another program. Check the taskbar for any open windows or background processes that might be accessing files on the drive — file managers, backup software, media players, and antivirus scans are common culprits. Close those programs and try ejecting again.
If ejecting still fails and you are certain no programs are using the drive, restart your computer. This closes all background processes and usually clears the lock. After restart, eject normally before unplugging.
Ejecting on Mac
Locate the external drive icon on your desktop or in Finder's sidebar. Drag the icon to the Trash in your dock, or select the drive and press Command+E. Your Mac will close the connection and the drive icon will disappear from the desktop. This is the signal that it is safe to unplug.
Alternatively, select the drive in Finder and click the Eject button in the toolbar at the top of the window. The result is the same — the drive disconnects and the icon vanishes. Do not unplug until the icon is gone from your screen.
If the drive will not eject and you see an error message saying the drive is in use, check Activity Monitor (in Applications > Utilities) to see which process is holding the drive open. Quit that process and try ejecting again. If you cannot identify the process, restart your Mac and eject after startup.
What to do if the drive will not eject
The most common reason a drive will not eject is that a file on it is still open in another program. Check your taskbar or dock for any windows you may have minimized. Look for file managers, backup software, cloud sync tools, media players, and antivirus programs — all of these can lock a drive. Close each one and try ejecting again.
If you have files open from the drive in a text editor, spreadsheet, or other process, close those files first. Closing the process itself is faster if you have many files open. After closing, eject and wait for the confirmation before unplugging.
On Windows, you can also try using the Device Manager to safely remove the drive. Press Windows+X, select Device Manager, find your external drive under "Disk drives," right-click it, and select "Uninstall device." This is more forceful than the standard eject and should work if the normal method fails. After uninstalling, you can unplug the drive.
Why unplugging without ejecting causes problems
When you save a file, your computer does not write it directly to the drive. Instead, it stores the data in a temporary buffer in your computer's memory and tells you the save is complete. The actual write to the drive happens later, in batches, when the system has time. If you unplug the drive before that write finishes, the file is lost or corrupted.
Beyond individual file loss, unplugging without ejecting can damage the drive's file system — the invisible structure that tells the drive where all your files are located. If the drive is in the middle of updating that structure when you unplug, the next time you connect it, the drive may not recognize its own files. In severe cases, the drive becomes unreadable until you run repair software, and even then, some data may be permanently lost.
Solid-state external drives (SSDs) are somewhat more resilient to sudden disconnection than older spinning drives, but they are not immune. Ejecting properly protects any external drive, regardless of its type.
Ejecting before traveling or moving your computer
If you are about to move your computer or put it in a bag, eject all external drives first. This prevents the drive from being jostled or bumped while it is still connected and potentially mid-operation. After ejecting, wait a few seconds before moving the computer or unplugging the drive.
If you regularly disconnect and reconnect the same drive, you do not need to eject every single time if you are certain no files are open and no programs are accessing it. However, if you are moving the drive to a different computer, putting it away for a while, or the drive will be out of your sight, eject first. It takes 30 seconds and eliminates the risk.
Frequently Asked Questions
What happens if I unplug without ejecting?
You risk losing unsaved data, corrupting files currently being written to the drive, or damaging the drive's file system. The drive may become unreadable the next time you connect it. In most cases, the damage is repairable with software, but some data may be permanently lost.
Do I need to eject if the drive is not doing anything?
Yes. Your computer may have background processes running that you cannot see — antivirus scans, backup software, or system maintenance tasks. Ejecting ensures all of those finish before you unplug, regardless of whether you notice them.
Can I eject a drive while files are being copied to it?
No. Wait for the copy operation to finish first. Your operating system will show a progress window or notification while the transfer is happening. Once that window closes and you see the confirmation that the operation is complete, then eject.
Is it safe to eject a drive and then plug it back in when ready?
Yes. Ejecting straightforward closes the connection cleanly. You can unplug and reconnect the same drive as many times as you need. Just eject before each disconnect.
What if my drive is frozen and will not respond to eject commands?
Force-shut down your computer (hold the power button for 10 seconds on most machines). This is a last resort, but it is safer than unplugging the drive while it is locked. After the computer restarts, eject normally before unplugging.
