A secure disk wiping utility implemented in Rust, providing multiple wiping methods to ensure your data cannot be recovered.
Maintained by: Sebastiaan Koetsier (2025)
Original concept: Darik Horn (nwipe/dwipe) and Andy Beverley (modifications)
nwipe is a powerful command-line utility that securely erases disks using various methods to ensure data cannot be recovered. This Rust implementation provides the same functionality as the original C version but with the benefits of Rust's memory safety and modern programming features.
- Multiple wiping methods:
- OPS-II (DoD 5220.22-M)
- DoD 5220.22-M
- Gutmann (35 passes)
- Random data
- Zero fill
- Multiple PRNG implementations:
- ISAAC
- MT19937 (Mersenne Twister)
- Standard library RNG
- Verification of wiped data
- Two user interface options:
- Modern graphical user interface (GUI)
- Traditional terminal user interface (TUI)
- Detailed logging
- Support for multiple rounds of wiping
- Rust and Cargo (1.70.0 or newer recommended)
- Linux/Unix-based operating system (for disk access)
- Root privileges (for disk wiping operations)
If you don't have Rust installed, the easiest way to install it is using rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Follow the on-screen instructions to complete the installation. Once installed, make sure to source the environment:
source "$HOME/.cargo/env"
-
Clone the repository:
git clone https://github.com/sebastiaankoetsier/nwipe.git cd nwipe
-
Build the project:
cargo build --release
-
Install the binary (optional):
sudo cp target/release/nwipe /usr/local/bin/
cargo install --git https://github.com/sebastiaankoetsier/nwipe.git
Check the releases page for pre-built binaries for common platforms.
nwipe requires root privileges to access and wipe disks:
sudo nwipe [OPTIONS] [DEVICE...]
-a, --autonuke
: Automatically wipe all devices, bypassing the GUI-e, --exclude-mounted
: Exclude mounted partitions-g, --nogui
: Run without any GUI (must be used with --autonuke)-t, --traditional-ui
: Use the traditional terminal UI instead of the modern GUI-h, --nowait
: Don't wait for a key before exiting-l, --nosignals
: Don't install signal handlers-p, --autopoweroff
: Power off system when wipe completed-v, --verbose
: Verbose output-P, --prng <PRNG>
: The PRNG algorithm to use (default: "isaac")-m, --method <METHOD>
: The wipe method to use (default: "ops2")-r, --rounds <ROUNDS>
: The number of times to run the method (default: 1)-V, --verify
: Verify the wipe
Wipe a specific device (uses modern GUI by default):
sudo nwipe /dev/sdb
Use the traditional terminal UI instead of the modern GUI:
sudo nwipe --traditional-ui /dev/sdb
Automatically wipe all devices:
sudo nwipe --autonuke
Use a specific wiping method:
sudo nwipe --method dod /dev/sdb
Run without any UI in automated environments:
sudo nwipe --autonuke --nogui --method zero
Run with modern GUI and specific options:
sudo nwipe --method gutmann --rounds 2 --verify
The modern graphical user interface provides an intuitive way to interact with nwipe. It features:
- Device selection with detailed information
- Progress monitoring with visual indicators
- Method and PRNG selection dropdowns
- Configuration options
- Real-time logging display
- Confirmation dialogs for safety
This is the default interface when running nwipe without any UI-related options.
The traditional terminal user interface provides a lightweight, ncurses-based interface that works well in terminal environments. Use this interface with the --traditional-ui
option.
This method performs three rounds of wiping:
- Write zeros
- Write ones
- Write random data
This method performs a single round of:
- Write zeros
- Write ones
- Write random data
This method performs 35 passes with various patterns, as described by Peter Gutmann.
This method performs a single pass of random data.
This method performs a single pass of zeros.
- IMPORTANT: nwipe will permanently destroy all data on the selected disks. There is NO RECOVERY possible after wiping.
- Always double-check device names before wiping.
- Never wipe your system disk while the system is running from it.
- Consider disconnecting important drives before running nwipe to prevent accidental data loss.
- Permission denied: Make sure you're running nwipe with sudo or as root.
- Device not found: Verify the device path is correct and the device is connected.
- Cannot wipe mounted device: Unmount the device first or use the --exclude-mounted option.
nwipe logs are stored in /var/log/nwipe.log
and can be useful for diagnosing issues.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request