nvme_sanitize_nvm(2)

πŸ’– nvme_sanitize_nvm β€” it's giving "delete everything, no takebacks"

okay so bestie, we're in the libnvme API manual, section 2, and today's main character is nvme_sanitize_nvm(2). yes the function name and the page name are the same, that's just how section 2 rolls, iykyk ✨


✨ NAME ✨

nvme_sanitize_nvm β€” Start a sanitize operation 🧼πŸ”₯


🌈 SYNOPSIS 🌈

int nvme_sanitize_nvm (struct nvme_sanitize_nvm_args *args );

πŸŽ€ ARGUMENTS πŸŽ€

  • args β€” a struct nvme_sanitize_nvm_args argument structure. that's the whole vibe, she just takes the struct 🫢

πŸ’… DESCRIPTION πŸ’…

so a sanitize operation literally alters all user data in the NVM subsystem, and the way it does it means recovery of any previous user data from any cache, the non-volatile media, or any Controller Memory Buffer is not possible. like. not possible possible. it's gone gone πŸ™ˆπŸ’€

The Sanitize command starts a sanitize operation or recovers from a previously failed sanitize operation. the sanitize operation types that may be supported are Block Erase, Crypto Erase, and Overwrite. iconic trio tbh πŸ‘‘

⚠️ lowkey important: all sanitize operations are processed in the background. so completion of the sanitize command does not indicate completion of the sanitize operation. not me finding this out the hard way 😭 the command finishing is not the operation finishing, they're two different girls.

⭐ RETURN ⭐

it hands you back the nvme command status if a response was received (see enum nvme_status_field), or -1 with errno set otherwise. slay 🌸


and that's the whole page fr fr β€” written up for the libnvme API manual and dated July 2026, page nvme_sanitize_nvm(2) out πŸ’– bye bestie, go sanitize responsibly 🧚✨

πŸ“¦ where this page comes from