| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A simple GUI utility for Ubuntu and Linux that safely unmounts and powers off external HDDs, SSDs, USB drives, and backup disks before unplugging them.
Unlike many file managers, this tool performs additional safety checks, flushes pending writes, powers off the device, and helps identify processes that are preventing safe removal.
Removing a drive immediately after closing a file manager window can still cause:
Safe Eject Linux provides a safer workflow:
When the success dialog appears, it is safe to unplug the drive.
Ubuntu / Debian:
sudo apt install zenity udisks2 lsofClone the repository:
git clone https://github.com/YOUR_USERNAME/safe-eject-linux.git
cd safe-eject-linuxMake the script executable:
chmod +x safe-eject.shRun:
./safe-eject.shThe repository includes:
eject-external-drive.desktop
To install it for your user:
mkdir -p ~/.local/share/applications
cp eject-external-drive.desktop ~/.local/share/applications/Ensure the script location matches the Exec= path in the launcher.
You can then launch Safe Eject Linux directly from the application menu.
safe-eject-linux/
│
├── safe-eject.sh
├── eject-external-drive.desktop
├── LICENSE
├── README.md
└── screenshots/
The script automatically excludes drives containing active Linux system partitions such as:
This helps prevent accidental system damage.
Before unmounting:
syncis executed to ensure pending writes reach the physical device.
All mounted partitions on the selected drive are safely detached.
The script uses:
udisksctl power-offto place the drive into a safe removable state.
If ejection fails, the script attempts to identify:
and displays them in an easy-to-read format.
Contributions for additional Linux distributions are welcome.
This utility intentionally refuses to eject drives that appear to contain active system partitions.
Always verify the selected drive before unplugging hardware.
MIT License
Bug reports, pull requests, and feature suggestions are welcome.
If the tool helped you, consider starring the repository.
Ubuntu safe eject
Linux safely remove hardware
External HDD unmount Linux
USB drive eject Ubuntu
Power off USB disk Linux
Zenity storage utility
Linux external drive management
Safe HDD removal tool
Safe SSD eject utility
UDisks2 graphical eject tool
| Back | FazBrowse Home | New Git URL |