Linux "wipefs" Command Line Options and Examples
wipe a signature from a device

wipefs can erase filesystem, raid or partition-table signatures (magic strings) from the specified device to make the signatures invisible for libblkid. wipefs does not erase the filesystem itself nor any other data from the device. When used without any options, wipefs lists all visible filesystems and the offsets of their basic signatures.


Usage:

wipefs [options] device...


    wipefs [--backup] -o offset device...


    wipefs [--backup] -a device...






Command Line Options:

-a
Erase all available signatures. The set of erased signatures can be restricted with the -t option.
wipefs -a ...
-b
Create a signature backup to the file $HOME/wipefs-<devname>-<offset>.bak. For more details see theEXAMPLES section.
wipefs -b ...
-f
Force erasure, even if the filesystem is mounted. This is required in order to erase a partition-tablesignature on a block device.
wipefs -f ...
-h
Display help text and exit.
wipefs -h ...
-J
Use JSON output format.
wipefs -J ...
-n
Do not print a header line.
wipefs -n ...
-O
Specify which output columns to print. Use --help to get a list of all supported columns.
wipefs -O ...
-o
Specify the location (in bytes) of the signature which should be erased from the device. The offsetnumber may include a "0x" prefix; then the number will be interpreted as a hex value. It is possibleto specify multiple -o options.The offset argument may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), andso on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g. "K" has the same meaning as"KiB"), or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
wipefs -o ...
-p
Print out in parsable instead of printable format. Encode all potentially unsafe characters of astring to the corresponding hex value prefixed by '\x'.
wipefs -p ...
-q
Suppress any messages after a successful signature wipe.
wipefs -q ...
-t
Limit the set of printed or erased signatures. More than one type may be specified in a comma-sepa‐rated list. The list or individual types can be prefixed with 'no' to specify the types on which noaction should be taken. For more details see mount(8).
wipefs -t ...
-V
Display version information and exit.EXAMPLESwipefs /dev/sda*Prints information about sda and all partitions on sda.wipefs --all --backup /dev/sdbErases all signatures from the device /dev/sdb and creates a signature backup file ~/wipefs-sdb-<off‐set>.bak for each signature.dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1 conv=notruncRestores an ext2 signature from the backup file ~/wipefs-sdb-0x00000438.bak.AUTHORKarel Zak <kzak@redhat.com>ENVIRONMENTLIBBLKID_DEBUG=allenables libblkid debug output.
wipefs -V ...