zeroing-drive-on-windows.md (998B)
1 --- 2 title: "Zeroing out a drive on Windows" 3 date: 2020-08-28T20:34:00 4 tags: ["Guides", "Servers", "Snippets", "Software", "Windows"] 5 --- 6 7 Recently I sold a couple more of the hard drives that made up my SnapRAID array back when I had a Linux powered home server. Wanting to check over the drives one last time for SMART info, and bad sectors I noticed I hadn't wiped the drive, and there were still readable files and partitions there. 8 9 Previously, I did this all via a USB3 dock on my Linux laptop using `dd`, but today we're on a Windows desktop, so let the adventure commence! 10 11 The command we want to run, in an elevated command prompt is: 12 ``` 13 format g: /fs:NTFS /p:1 14 ``` 15 In this example, we're formatting drive **G**. The `/p` parameter here is what's doing the zeroing, indicating the number of passes. 16 17 Now to **fully** clean a drive, after the above you can wipe the partition table from the disk by running: 18 ``` 19 start > run > cmd 20 diskpart 21 list disk 22 select disk 1 23 clean 24 ``` 25 26 And you're done.