In order to securely wipe an NVME drive you can use the nvme-cli
package that provides the nvme
command
nvme
only exists in the root path so you have to use sudo nvme
.
For Debian you need to add jessie-backports (on jessie) and it may be in the newer version default repos. For Ubuntu it should be available in the default repos from Xenial onwards, there may be a PPA if you need it on earlier versions.
You can find your devices with sudo nvme list
and securely format with sudo nvme /dev/nvme0n1 --ses=1
.
You can also explicitly add a namespace but I haven't seen or setup a drive with multiple yet.
Soon I'd like to make an extremely tiny netbootable image with Alpine or Debian to boot with https://netboot.xyz as pulling down the Debian LiveCD and adding the extra repository just to run a couple commands was overkill.