# How to Eject All Disks on Mac at Once

URL: https://www.raycast.com/guides/how-to-eject-all-disks-on-mac
Published: 2026-11-26
Updated: 2026-11-26
Description: Unplugging your MacBook from a dock full of drives? Eject every external disk and disk image in one step with Raycast, or with Finder, Terminal and a one-line AppleScript.

You're heading to a meeting and your MacBook is plugged into a dock with a backup drive, an SD card and a couple of mounted disk images. Ejecting them one by one takes longer than packing your bag.

**The short answer:** open Raycast, type **Eject All Disks** and press Return. Every mounted disk is ejected in one go, and you can unplug. It's one of Raycast's built-in [System Commands](https://manual.raycast.com/system-commands), and it's free. Without Raycast, select the disks on your desktop and press `⌘` `E`.

| Method                  | All disks at once      | Keyboard only | Setup       |
| ----------------------- | ---------------------- | ------------- | ----------- |
| Raycast Eject All Disks | Yes                    | Yes           | None        |
| Finder                  | If you select them all | `⌘` `E`       | None        |
| AppleScript in Terminal | Yes                    | Yes           | A one-liner |

## Eject all disks with Raycast | The quickest way

1. Open Raycast.
2. Type **Eject All Disks** and press `↵`.
3. When the disks disappear from Finder's sidebar, unplug them.

![Eject All Disks is a built-in Raycast command. One press ejects every mounted disk before you unplug.](https://www.raycast.com/uploads/how-to-eject-all-disks-on-mac/how-to-eject-all-disks-on-mac.png)

> Pro tip: give the command an [alias](https://manual.raycast.com/command-aliases-and-hotkeys) like `ej`, or a hotkey, so leaving your desk is two keystrokes.

If a disk won't eject, an app is still using one of its files. Quit it and run the command again. **Quit All Apps** is another built-in command if you want a clean slate.

## Eject from Finder | Built in: Finder

Finder ejects one disk at a time, or several if you select them together:

- In the Finder sidebar, click the **Eject** button next to the disk.
- On the desktop, select a disk and press `⌘` `E`, or drag it to the Trash, which turns into an Eject icon.
- To eject several, select them all on the desktop (hold `⌘` and click each one, or drag a box around them) and press `⌘` `E`.

External disks only show on the desktop if **Finder → Settings → General → External disks** is turned on.

## Use Terminal | Built in: Terminal

This one line asks Finder to eject every disk that can be ejected:

```bash
osascript -e 'tell application "Finder" to eject (every disk whose ejectable is true)'
```

To eject a single disk, use `diskutil`:

```bash
diskutil eject /Volumes/Backup
```

Save the first line as a [Script Command](https://manual.raycast.com/script-commands) and it becomes a Raycast command too, but the built-in **Eject All Disks** already does the same job.

## New to Raycast?

Here's a quick tour of what else it can do, in under seven minutes:

[Video: 102 Things You Can Do With Raycast 2.0](https://www.youtube.com/watch?v=G7_7F_FBqQE)

## Frequently Asked Questions

### Is there a shortcut to eject all disks on Mac?

Not by default. Raycast's free **Eject All Disks** command does it in one step, and you can give it a hotkey. In Finder, you can select several disks on the desktop and press `⌘` `E`.

### What's the keyboard shortcut to eject a disk on Mac?

Select the disk in Finder or on the desktop and press `⌘` `E`. On older Apple keyboards with an Eject key, that key ejects optical discs.

### Why can't my Mac eject a disk?

An app is still using a file on it. Quit apps that might have its files open, including Terminal windows whose current folder is on the disk, then try again. macOS usually names the app that's blocking it.

### Is it bad to unplug a drive without ejecting it?

It can be. If something was still being written, the file or the drive's file system can be damaged. macOS warns you with a "Disk Not Ejected Properly" notification.

### How do I eject all disks from Terminal?

Run the one-line AppleScript from the Terminal section above, which asks Finder to eject every disk that can be ejected. To eject a single disk, use `diskutil eject` followed by its path, like `/Volumes/Backup`.
