Error "The disk was not ejected properly" on macOS
The message "The disk was not ejected properly" is one of the most common errors on macOS that users encounter when working with external drives. This problem can lead to data loss and file system corruption.
Causes of the Error
The disk ejection error on macOS occurs for several reasons:
- Active file usage — an application is still accessing files on the external disk
- Incomplete data writing — data is being copied or written in the background
- File system issues — corruption of the disk structure
- Driver or power conflicts — insufficient power to the USB port
- macOS malfunctions — system errors affecting drive operations
How to Fix the Error
Method 1: Standard Ejection via Finder
- Open Finder
- In the left sidebar, locate your external disk
- Right-click on the disk
- Select "Eject"
- Wait for the disk icon to disappear from the sidebar
Method 2: Ejection via Finder Menu
- In Finder, select File → Eject (or use the keyboard shortcut Cmd+E)
- If the disk is selected in the sidebar, it will be ejected
Method 3: Using Terminal
Open Terminal and run the following command:
diskutil list
Find your disk name in the list (for example, MyExternalDrive). Then run:
diskutil eject /Volumes/MyExternalDrive
Replace MyExternalDrive with the actual name of your drive.
Method 4: Force Ejection
If standard methods do not work:
- Open Activity Monitor
- Search for "diskidle" or "fseventsd"
- Terminate processes related to the external disk
- Try to eject the disk again
Method 5: Checking the Disk in Disk Utility
- Open Disk Utility
- Path: Applications → Utilities → Disk Utility
- Select your external disk in the sidebar
- Click "First Aid"
- Wait for the check to complete and follow the on-screen instructions
Preventing Ejection Issues
To avoid the "The disk was not ejected properly" error in the future:
- Always use safe ejection — do not pull out the disk without warning
- Check the activity indicator — ensure that no files are being copied
- Close applications — close all programs using the disk before ejection
- Use quality cables — power issues can cause errors
- Regularly check the disk — run "First Aid" as a preventive measure
Additional Terminal Commands
View the list of connected disks
diskutil list
Information about a specific disk
diskutil info /Volumes/MyExternalDrive
Mounting/unmounting a disk
diskutil unmount /Volumes/MyExternalDrive
diskutil mount /Volumes/MyExternalDrive
Force unmounting
diskutil unmountForce /Volumes/MyExternalDrive
Common Scenarios and Solutions
Error when ejecting a USB flash drive
- Check if Finder is open with files from the flash drive
- Close all documents from the flash drive
- Use the command
diskutil eject
Error when ejecting an external hard drive
- Stop all copying operations
- Check Disk Utility for errors
- Ensure that the disk is receiving enough power
Error when ejecting an SD card
- Close the Photos app or any other applications using the card
- Use safe ejection in Finder
Conclusion
The error "The disk was not ejected properly" on macOS is a system warning about potential data threats. Follow the recommendations for safe ejection of drives, and you will avoid file loss and disk corruption.
If the problem recurs regularly, check the disk for physical damage and consult a specialist for diagnosis.