Wiping Disk Partitions and Filesystems using Linux
Jake G July 15, 2022 #Linux #Commandline #FilesystemSometimes I need to setup a drive for things such as xbox, windows, or other things, and they have issues if the drive already has a file system in place. Here I list some of the ways I have found to wipe out a file system and partitions of a drive.
First you need to identify the correct disk!
fdisk -l
Any of the below methods should work, I may add more methods to this page if any of these methods ever fail to work for me.
Using wipefs:
wipefs -a /dev/sdz
Using DD:
dd if=/dev/zero bs=512 count=1 of=/dev/sdz status=progress
Using Parted:
parted /dev/sdz mklabel gpt