How can i erase a SSD storage?

Hi … How can i wipe, erase all SSD WD BLACK S/N 850 using dd command ? … What happen with de WD BLACK firmware ?

dd is unreliable for that purpose on an SSD because of the overprovisioning. Better is to use blkdiscard. :arrow_down:

sudo blkdiscard -sf /dev/name-of-device-here

The firmware will normally not be touched by this. It’s located in a section of the device that isn’t accessible from userspace.


Can you explain me how to work this command ?

I gave you the command, in post #2. The one thing I cannot give you is the exact device special file to supply as the command parameter, because I’m not at your computer.

1 Like

This command wipe the entirety storage ?

Yes, it will.

1 Like

Ok, thanks a lot

The system returns me BLKDISCARD ioctl failed: opration not supported

Be careful and make sure you’re using the correct device name.

Don’t run it on a mounted file-system or another device by accident. :grimacing:

Can you paste the exact command you were using?

I run the command from a live usb and the storage name is correct

Command: sudo -sf blkdiscard -sf /dev/name-device

Be careful what you type. This is what Aragorn posted above.

1 Like

No, by name-of-the-device he meant what is the name of the device in the system that you are willing to erase.
To get the name, simply run lsblk
Under the name column it will give you the name of the device.
Replace that with name-device in your command that you are trying to run. Hope that helps.

1 Like

This is an interesting paper on the subject

It is referenced on the Arch Wiki in the topic

You may also find the following article enlightening

1 Like

I’know, sorry but don’t work

sudo blkdiscard -sf /dev/nvme0n1

Operation don’t supported

That one is easy - your device does not support this - because it is NVMe which is implemented differently.

Install the package nvme-cli - then take a look at the man page

man nvme

The utility has a subcommand nvme-write-zeroes(1) which may be what you are looking for.



This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.