# nwipe is a fork of the DBAN eraser, and its I/O layer is the part that was rewritten

> A C command line and ncurses tool that securely erases block devices, with recognised wipe methods, selectable PRNG engines, a multi-page PDF certificate and hardware native ATA and NVMe secure erase. The v0.40 rewrite of the I/O subsystem and the v0.43 standalone secure erase are what separate it from the dwipe ancestor.

**martijnvanbrummelen/nwipe** — nwipe secure disk eraser

- Repository: https://github.com/martijnvanbrummelen/nwipe
- Stars: 1,250 · Forks: 127
- Language: C
- License: GPL-2.0
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/martijnvanbrummelen-nwipe

## A fork of dwipe, which came from DBAN

nwipe is a fork of the dwipe command originally used by Darik's Boot and Nuke, DBAN. It was created to run the DBAN erase engine on any Linux distribution, with better and more modern hardware support.

That lineage explains the shape of the tool. The erase engine and the method list come from DBAN, a project from before the current era of disk management, and the fork's job was to make that engine build and run on contemporary Linux and to work with contemporary hardware. The licence is GPL-2.0 and the primary language is C, with the autotools build files `configure.ac`, `Makefile.am` and `autogen.sh` at the root.

The tool erases the entire contents of block devices and can wipe a single drive or multiple disks in parallel, either as a command line tool without a GUI or with an ncurses based GUI. The parallel capability is the feature that distinguishes it from a simple dd-style overwrite script, and the example animation in the README shows six drives being erased at once, with five completing successfully and one failing on an I/O error.

That failure case is described in a way that tells you what the tool is for. The failing drive would typically be physically destroyed, and drives that complete with zero errors can be safely redeployed. So nwipe is aimed at a refurbishment or decommissioning workflow where the drives go back into service, and the verification step is what makes redeployment safe rather than hopeful.

The output of that workflow is a certificate. The screenshot shows a three page PDF certificate with drive identifying data such as serial numbers, and the caption notes that those details have been anonymised using the `-q` or `--quiet` option. A PDF certificate per wiped drive is the audit trail, and the anonymisation option is there for the case where you want the record without the serial number.

The maintenance picture is active. v0.43 came on 2026-10-02, v0.42 on 2026-07-15 and v0.41 on 2026-05-16, and the last push to the repository was on 2026-10-16 with the repository not archived.

## The method list spans 1970s standards to a 2019 Chinese requirement

The erase methods are the substance of the tool, and the list is a catalogue of recognised standards rather than a set of ad hoc overwrites.

The simple ones are Fill With Zeros, which fills the device with `0x00`, and Fill With Ones with `0xFF`, plus the two verification methods, Verify Zeros and Verify Ones, which read the device back and check the fill.

The standards-based ones are where the compliance value sits. RCMP TSSIT OPS-II is the Royal Canadian Mounted Police Technical Security Standard. DoD 5220.22-M Short is the US Department of Defense short three-pass wipe, using passes 1, 2 and 7, and DoD 5220.22-M Full is the seven-pass version. Gutmann Wipe is Peter Gutmann's 35-pass method from the paper Secure Deletion of Data from Magnetic and Solid-State Memory. HMG IS5 Enhanced is the UK sanitisation method for protectively marked or sensitive information. Schneier Wipe is Bruce Schneier's seven-pass mixed pattern algorithm. BMB21-2019, which the README marks as new in v0.40, is a Chinese State Secrets Bureau technical requirement for data sanitisation. PRNG Stream fills the device with a stream from the selected generator.

The Gutmann method deserves a note, because a 35-pass wipe is now widely considered unnecessary for modern drives and even counterproductive on SSDs, where the wear levelling means the write never lands where you expect. The method is still in the list because compliance regimes still reference it, which is a good illustration of why an eraser keeps methods that are theoretically redundant.

The entry that is new in the most recent release is of a different kind. Standalone Secure Erase, with the block, crypto scramble and overwrite variants, performs interactive, standalone, hardware native drive sanitization using the drive's own ATA or NVMe block erase, cryptographic scramble or pattern overwriting, directly from the nwipe GUI. That is a different relationship with the hardware from overwriting it yourself, and the word standalone in the name indicates the command runs against the drive directly rather than going through a firmware update mechanism that the OS would block.

## Eight PRNG engines, and the choice depends on the threat model

For the methods that need random data, the generator is selectable at runtime, and the README is explicit about which ones are cryptographically secure.

The non-cryptographic ones are XORoshiro-256, described as a very fast, high quality non-cryptographic generator suitable for high volume random wiping where a CSPRNG is not strictly required, the Additive Lagged Fibonacci Generator, the Mersenne Twister with its well known high period, SplitMix64, new in v0.41 and described as a general purpose non-cryptographic generator optimised for 64-bit architectures.

The cryptographically secure ones are ISAAC-64 and ISAAC, the 64 and 32 bit variants of the Indirection, Shift, Accumulate, Add and Count generator, AES-256-CTR, new in v0.40 and described as a high throughput counter mode stream cipher using hardware AES-NI where available, and ChaCha20, new in v0.41, described as needing no special hardware and used worldwide in TLS and SSH.

The distinction matters more than it does for random data in general. A PRNG stream wipe is meant to defeat statistical recovery of the previous contents. If the generator is predictable, an attacker who knows the seed and the position can reconstruct what was there. A non-cryptographic generator is fast and statistically good, which is why the README frames it as acceptable for high volume wiping where a CSPRNG is not strictly required, but that framing only holds if the data being overwritten is not the real target of the attack.

For the wipe methods that use random passes, the PRNG Stream, Schneier and BMB21 random passes, the generator you pick is a direct part of the strength of the wipe, and the man page has the exact CLI options for selecting one at runtime.

## The v0.40 I/O rewrite is where the modern hardware support lives

Starting with v0.40 the nwipe I/O layer was significantly modernised, and this is the part of the project that distinguishes it from the dwipe ancestor.

The first change is large, aligned multi-megabyte buffers when reading and writing. The stated benefits are that it reduces the number of `read()` and `write()` calls, improves throughput on fast devices such as SSD, NVMe and high-speed RAID, and ensures correct alignment for Direct I/O where it is supported. For a tool whose job is to push a whole disk through as fast as the hardware allows, the syscall count is the bottleneck on fast media, so this is a straightforward win.

The second change is explicit I/O mode selection.

```bash
--io-mode=auto      # default
--io-mode=direct    # equivalent to --directio
--io-mode=cached    # equivalent to --cachedio

--directio          # force O_DIRECT (no fallback)
--cachedio          # force kernel cached I/O only
```

The auto mode tries to open the device with `O_DIRECT` and, if the kernel or filesystem does not support it with EINVAL or EOPNOTSUPP, falls back to cached I/O and logs a warning. The forced modes exist for the cases where the fallback is the wrong behaviour, for instance on a device where you specifically want the kernel cache in play or specifically want to avoid it.

The `O_DIRECT` alignment requirement is why the buffer alignment matters, and it is also why the multi-megabyte aligned buffers are not just a throughput optimisation. An unaligned buffer with `O_DIRECT` fails, so the two changes are coupled.

The README also documents sync behaviour, and the repository contains a `ssd-guide.md` at the root, which is the right place to look for the interaction between overwriting and flash translation layers.

## hdparm and smartmontools are mandatory, and the failure is quiet

The warning at the top of the README is the kind that is easy to skim and expensive to get wrong.

For some of nwipe's features, such as the SMART data in the PDF certificate, the HPA and DCO detection and other functions, nwipe uses external tools: smartmontools and hdparm. Both are mandatory if you want all nwipe features to be fully available. If they are not installed at runtime, nwipe will log a warning and continue, but many important features will not work as intended.

That last clause is the one to hold on to. The tool does not fail, and it does not refuse to wipe. It logs a warning, produces a certificate, and the certificate has holes in it. A drive that reports its model but not its SMART data, or a drive whose Host Protected Area is not detected, will produce a record that looks complete and is not.

The HPA and DCO point is the sharpest of these. Host Protected Area is a region of a disk that is hidden from the operating system, and DCO is the Device Configuration Overlay. If a drive has an HPA that the tool cannot see, a wipe that only covers the visible capacity leaves the hidden region untouched. Detecting that requires hdparm, which is exactly why it is a hard requirement rather than a nicety.

The install instructions take this seriously, with prerequisite sections for Debian and Ubuntu, Fedora, RHEL and CentOS Stream, Arch Linux and Manjaro, and openSUSE Leap and Tumbleweed, plus a separate section for the NVMe secure erase prerequisites. The compilation section follows, and there is a section on automating the download and compilation on Debian based distributions, a USB bootable build of master for x86 systems, and a section on which Linux distributions ship the latest nwipe. The `man/` directory at the root holds the manual pages, and there is a `tests/` directory along with a `docs/` directory.

## Conclusion

Adopt nwipe if you are wiping drives as part of a decommissioning or refurbishment workflow and want a self contained Linux tool with an audit trail, rather than a drive manufacturer's secure erase command alone. Do not adopt it if the drives are SSDs and the only requirement is that the data be unrecoverable, because a firmware level secure erase is faster and stronger than overwriting and nwipe now offers it as a separate path rather than a default. Verify first that smartmontools and hdparm are installed at runtime, since without them SMART data in the certificate, HPA and DCO detection and other features silently do not work, and that the method you pick is one your compliance regime actually recognises.

## FAQ

### What is nwipe and what does it do?

nwipe securely erases the entire contents of block devices, either as a command line tool without a GUI or with an ncurses based GUI, wiping a single drive or multiple disks in parallel. It is a fork of the dwipe command originally used by Darik's Boot and Nuke.

### Which wipe methods does nwipe support?

Fill With Zeros, Fill With Ones, RCMP TSSIT OPS-II, DoD 5220.22-M short and full, Gutmann Wipe, PRNG Stream, Verify Zeros, Verify Ones, HMG IS5 Enhanced, Schneier Wipe, BMB21-2019, and Standalone Secure Erase with block, crypto scramble and overwrite variants.

### Why does nwipe need smartmontools and hdparm?

For features such as the SMART data in the PDF certificate, HPA and DCO detection and other functions. Both are mandatory for full functionality, and if they are missing at runtime nwipe logs a warning and continues, with many important features not working as intended.

### How do I control direct versus cached I/O in nwipe?

Use --io-mode=auto, which is the default and tries O_DIRECT then falls back to cached I/O, or force it with --directio for O_DIRECT with no fallback or --cachedio for kernel cached I/O only. The --io-mode=direct and --io-mode=cached forms are equivalent to those flags.

### Which PRNG engines can nwipe use for random wipes?

XORoshiro-256, the Additive Lagged Fibonacci Generator, ISAAC-64, ISAAC, the Mersenne Twister, AES-256-CTR, SplitMix64 and ChaCha20. The ISAAC variants, AES-256-CTR and ChaCha20 are the cryptographically secure ones, and the generator is selected at runtime from the man page options.

## Sources

- [Issues](https://github.com/martijnvanbrummelen/nwipe/issues)
- [License: GPL-2.0](https://github.com/martijnvanbrummelen/nwipe/blob/master/LICENSE)
- [martijnvanbrummelen/nwipe on GitHub](https://github.com/martijnvanbrummelen/nwipe)
- [README](https://github.com/martijnvanbrummelen/nwipe/blob/master/README.md)
- [Releases](https://github.com/martijnvanbrummelen/nwipe/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/martijnvanbrummelen-nwipe
