Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an external disk with two partitions on it that I keep plugged into my MacBook Pro when I'm at my desk. (One is for Time Machine, the other just for extra storage.) Sometimes I need to grab my laptop quickly and take it somewhere, but I have to change to a space where I can see the partitions on the desktop, lasso them, two-finger click, and select Eject. Is there a faster way under Mavericks, or do I have to set up an AppleScript like this one with a keyboard shortcut?

Note: I'm not looking to eject these only when I put my Mac to sleep (as explored here). Sometimes I'm on a screen-sharing telecon and I have to take my Mac away from my desk for a minute, if you know what I mean :-).

share|improve this question
I use to do this task. It makes it as easy as pressing <kbd>cmd</kbd>+<kbd>space</kbd> and typing eject. Highly recommended – wrossmck Aug 28 '14 at 15:07
Lots of good answers below. I'm having a tough time choosing one as the best. – Jim L. Aug 29 '14 at 13:58
up vote 5 down vote accepted

On OS-X Mountain-Lion, I can option-click one of the "Eject" icons (hold down option, then click the eject icon), and all external partitions will eject.

(Update) This has been verified to also work on OS X Mavericks, as I suspected it would. It can probably be assumed to work on at least all versions in between (try it out!).

share|improve this answer
This still works under Mavericks. – Jim L. Aug 29 '14 at 13:57
This turns out to be the most satisfying answer for me. One quick key chord and it's done. No extra software needed. Thanks! – Jim L. Nov 9 '14 at 4:50
Seems not to work anymore on El Capitan. Can anyone confirm? – Matteo Mar 2 at 13:46
Still works for me! – Jim L. Mar 22 at 21:50

The only caveat to "quickly ejecting" disks with any reliability is that they will not eject if there are files in use which reside on them. That said, you can force eject disks, but that would not be ideal if files are, in fact, in use.

Easiest way to instantly eject all disks is by invoking an Applescript (could also create a shell script, but Applescript is more easily turned into a one-click application solution).

So go to your Applescript Editor, paste in the following:

tell application "Finder" to eject (every disk whose ejectable is true and local volume is true and free space is not equal to 0)

Enter Code in your Script Editor

and save the script as an application wherever you choose (do NOT use the /tmp folder as illustrated). Add the resulting application to your Dock, and you have a one-click Quick Eject.

Select 'Application' as your file format

Note: the and free space is not equal to 0 portion is so that the script doesn't eject the contents of your CD/DVD drive. Remove that if you would like any inserted disks ejected as well.

share|improve this answer
I've wrapped this in a Ruby script in my answer here... sort of the same thing over again... – Dan Rosenstark Nov 12 '15 at 23:25

I use launchbar to automate this task. It has a command shortcut to Eject All Ejectable Volumes. It's incredibly fast and if you turn off most of the indexing rules, the memory footprint and CPU usage can be tiny.

It's much more powerful than this one trick, but it does do that trick very well and you'd probably be fine using the free version for that purpose since you'd only be using that one shortcut.

share|improve this answer

I'd recommend Alfred. It's a quick launching app that includes the feature of ejecting volumes. You can select what kind of targets qualify for the command (network drive, local, etc.).

alfred eject command

When you trigger the shortut, you can select a specific volume to unmount. Or you can type ejectall (this shortcut name is customizable).

share|improve this answer

if you happen to have the same setup everytime you want to eject several external disks at once, you could use AppleScript / Automater and make your own keyboard shortcut. There is a detailled description how to do this over here:

share|improve this answer

You can use the menu bar app Ejector to eject all ejectable volumes. The only regrettable part for me is that I can't eject them without logging in.

share|improve this answer

Personally, I'm using Alfred as suggested in another answer. But here's the Applescript answer, wrapped up in a Ruby script.

#!/usr/bin/env ruby
#eject-all shell script

# Dan Rosenstark 2015-11-12 15:28
def osascript(script)
  system 'osascript', *script.split(/\n/).map { |line| ['-e', line] }.flatten

if __FILE__ == $0
  appleScript = "tell application \"Finder\" to eject (every disk whose ejectable is true and local volume is true and free space is not equal to 0)";
  osascript appleScript
  puts "I probably ejected all the disks."

you'll have to put it in your path and make it executable.

share|improve this answer

This can be done elegantly with an automator application and using the Display Notification feature for output. Simply save the following as an application and launch it however you prefer.

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.