
The information you keep on your computer is important. The same warnings apply here as with the format process: back up important data first because this command erases it! Information management Here is the command I use: $ sudo nvme sanitize /dev/nvme0nX

-ause, -u - Allow unrestricted sanitize exit.-oipbp, -i - Overwrite invert pattern between passes.-no-dealloc, -d - No deallocate after sanitize.The command nvme sanitize help command provides you with a list of sanitize options, which include the following: If your computer contains one of the newer NVMe drives, you can install the nvme-cli utilities and use the sanitize option to erase your drive. Warning: Be sure that you know where you are on your system and target the correct drive so that you don't accidentally erase your own data. $ sudo dd if=/dev/urandom of=/dev/sdX bs=10M If you want to write zeros over your entire target disk, issue the following command. Nearly every Linux installation comes with the dd utility installed. The dd commandĪ common method for erasing drives is with the Linux dd command. You can make a bootable USB drive by downloading the 32 bit or 64 bit image and writing it to a drive with the dd command on Linux and macOS: $ sudo dd if=shredos.img of=/dev/sdX bs=4M status=progressĪlternately, you can use the Etcher tool on Linux, macOS, and Windows. It uses the nwipe application, which is a fork of DBAN's dwipe. It was developed after a similar distribution, called DBAN, was discontinued. ShredOS is a live Linux distribution with the sole purpose of erasing the entire contents of a drive. Use shred -help for more information ShredOS

z - add a final overwrite with zeros to hide shredding.f - force the change of permissions to allow writing if necessary.Several Linux utilities can easily accomplish this. Rather than leave the drives in the original computer, I remove them, place them in a drive enclosure, and connect them to my Linux computer. It needs to be erased and then disposed of properly.

However, it's not a good idea to just throw an old drive in the trash. I'm happy to refurbish these older computers and refit them with a newer solid-state drive, dramatically improving performance. Invariably, they're more than willing to help me recycle them so that they can be used by someone else. I'm frequently called on to help clients upgrade an old computer. Free online course: RHEL Technical Overview.
