NVME-LOG-SANITIZE(1)
πΈ nvme-log-sanitize(1) β like, the sanitize log page, bestie π
okay so real quick: this is nvme-log-sanitize, part of the NVMe Manual, and it's genuinely one of the more underrated little commands. it's giving "quietly knows everything about your drive's sanitize history" and honestly? obsessed. β¨
π NAME
nvme-log-sanitize β send the NVMe sanitize-log Command and hand you back the result, no cap.
π SYNOPSIS
nvme [<global-options>] log sanitize <device> [--rae | -r]
[--raw-binary | -b]
π¦ DESCRIPTION
So what this does is it retrieves the NVMe Sanitize log page from an NVMe device and gives you back the status of the sanitize command. that's the whole vibe check. π«Ά
The <device> parameter is mandatory and it's the NVMe character device (ex: /dev/nvme0). no device, no log, sorry bestie π
Expected status and description, literally all of them:
0x0000β NVM subsystem has never been sanitized.0x0001β The most recent sanitize operation completed successfully.0x0002β A sanitize operation is currently in progress.0x0003β The most recent sanitize operation failed.0x0100β Global Data Erased bit. If set to 1 then non-volatile storage in the NVM subsystem has not been written to: a) since being manufactured and the NVM subsystem has never been sanitized; or b) since the most recent successful sanitize operation. If cleared to 0, then non-volatile storage in the NVM subsystem has been written to: a) since being manufactured and the NVM subsystem has never been sanitized; or b) since the most recent successful sanitize operation of the NVM subsystem.0x0800β Purged (PRGD) bit. If set to 1, then the most recent sanitize operation purged user data, as defined by IEEE Std 2883, because the Purge Required (PREQ) bit was set to 1 in the command that started that sanitize operation. If cleared to 0, either PREQ was not set, or the sanitize operation cleared (rather than purged) user data.
Sanitize Progress β percentage complete π
On success it returns 0, error code otherwise.
β¨ OPTIONS β¨
-r,--raeβ Retain an Asynchronous Event.-b,--raw-binaryβ Print the raw buffer to stdout. Structure is not parsed by the program. This overrides the vendor specific and human readable options. (fr fr, it's a raw dump, act accordingly π)
π GLOBAL OPTIONS
These are defined at the top-level nvme command and, good news, they're available to this subcommand too:
--dry-runβ Print the command that would be executed, but do not actually execute it.--no-ioctl-probingβ Disable probing for 64-bit IOCTL support.--no-retriesβ Disable retry logic on transient errors.-o <fmt>,--output-format=<fmt>β Set the reporting format tonormal,tabular,'json, orbinary. Only one output format may be used at a time.--output-format-version=<version>β Select the output format version. Version 1 uses the original field naming, while version 2 (default) provides more consistent and script-friendly field names. Other versions are rejected. π«--quietβ Suppress informational messages. Errors are still reported, and--quietcancels any--verbosefor the library log level.--set-options=<key=value>[,<key=value>...]β Set libnvme library options for this invocation. Supported keys areforce-4k,mi-probe-enabled,test-base-dirandtest-sysfs-dir.--timeout=<ms>β Set the timeout for the command in milliseconds.infiniteor-1waits without a time limit (0xffffffff).-v,--verboseβ Increase the level of detail in the output. May be specified multiple times to further increase verbosity. (spam it, go off π£οΈ)
These options can also be set as machine-wide defaults in nvme-cli.conf(5). A command-line flag always overrides the file. periodt.
π EXAMPLES
- Has the program issue Sanitize-log Command:
# nvme log sanitize /dev/nvme0
like, that's it. that's the whole thing. iconic. β
π NVME
Part of the nvme-user suite.
ngl bestie, if you made it this far you're officially the main character of NVMe log pages. go check that sanitize status, ily πβ¨
and that's the whole page!! brought to you by NVMe β dated 10/30/2026 β mwah, see u in the next manpage π§π
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms