Having a CD or DVD stuck in your Mac or an optical drive isn't a fun situation. And while there are a number of ways to force the media to be ejected, most require you to shut down. If that presents a problem, you can use Terminal to force eject the CD or DVD, without shutting down your Mac.
Use Terminal to Eject a Stuck CD or DVD
- Launch Terminal, located at /Applications/Utilities.
- In the Terminal window, enter one of the following three commands:
- If you have a single optical drive:
drutil eject internal
drutil eject external
- Press return or enter after entering one of the above commands in Terminal.
- The stuck CD or DVD should be ejected.
- You can quit Terminal.