macOS utility

DiskFree

Eject stubborn macOS disks without logging out.
Find what's blocking, close it safely, eject cleanly.

View Source

Sound familiar?

macOS dialog: The disk Extreme SSD couldn't be ejected because the Finder is using it. DiskFree by Taha Abbasi fixes stubborn disk and memory card ejection on Mac.

DiskFree fixes this. ↓

Terminal — eject-disk
$ ./eject-disk.sh
╔══════════════════════════════════════════╗
DiskFree — eject stubborn disks
╚══════════════════════════════════════════╝
Scanning for external volumes...
Found 2 volume(s):
1) Extreme SSD
2) GoPro SD
Select volume to eject [1-2]: 1
Checking what's using Extreme SSD...
Blocking processes:
Preview (PID 1847) — readinguser app
mds_stores (PID 312) — readingsystem
fseventsd (PID 97) — readingsystem
1 user app(s), 2 system process(es)
System processes (Spotlight, iCloud, etc.) release automatically on unmount
Close blocking apps and eject? (Y/n): y
Closing Preview (PID 1847)...
Preview closed
Attempting to eject Extreme SSD...
Extreme SSD ejected successfully!
Safe to remove the disk.

What it does

🔍

Finds blockers

Shows which apps and processes are preventing ejection, and whether they're reading or writing to the disk.

🛡️

Safe by default

Warns you if any process is actively writing before taking action. No data corruption risk.

One command

Closes blocking apps and ejects cleanly — no logout, no Force Quit, no restart required.

🎯

Smart detection

Separates user apps from system processes (Spotlight, iCloud) that release automatically on unmount.

Get started

1

Copy or download the script

Click Copy Script above and paste into a file called eject-disk.sh, or download it directly.

2

Make it executable

chmod +x eject-disk.sh
3

Run it

./eject-disk.sh

Or pass a volume name directly: ./eject-disk.sh "Extreme SSD"

Pro tip

Add to your PATH for global access — run from anywhere, no path needed:

sudo mv eject-disk.sh /usr/local/bin/eject-disk

One-liner install

$ curl -sL https://raw.githubusercontent.com/getdiskfree/diskfree/main/eject-disk.sh -o /usr/local/bin/eject-disk && chmod +x /usr/local/bin/eject-disk
Good to know

DiskFree is fully open source — a single readable bash file with no dependencies, no network calls, and no telemetry. It uses lsof, kill, and diskutil — standard macOS tools. We recommend reviewing any script before running it on your machine.

If a process is actively writing to your disk, DiskFree will warn you before taking action. Save your work before closing blocking apps. This software is provided "as is" under the MIT License.