wipefs
Erase filesystem, RAID, and partition table signatures
TLDR
Display signatures for specified device
Wipe all available signature types for a specific device with no recursion into partitions
Wipe all available signature types for the device and partitions using a glob pattern
Perform dry run
Force wipe, even if the filesystem is mounted
SYNOPSIS
wipefs [options]
PARAMETERS
-a, --all
Erase all signatures found on the device.
-b, --backup
Backup the signatures to the specified file before erasing.
WARNING: This will include full content of block, including possible personal data!
-f, --force
Force erasure, even if the device is mounted or busy.
Use with caution!
-i, --input-offset
Examine the device at the specified
-n, --no-act
Print signatures, but do not erase them (dry run).
-o, --offset
Erase signatures at the specified
-p, --parsable
Produce parsable output.
-q, --quiet
Suppress some error messages.
-s, --sector-size
Specify the sector size (in bytes).
-t, --types
Erase only the signatures of the specified types (comma separated list).
-u, --undo
Undo an earlier wipefs operation by restoring from the backup.
-v, --verbose
Verbose output.
-V, --version
Display version information and exit.
-h, --help
Display help text and exit.
DESCRIPTION
wipefs examines a specified device to identify file system, RAID, and partition-table signatures/metadata. It can then selectively erase these signatures to make the device appear blank. This is useful for preparing a device for reformatting or repartitioning. wipefs is a safer alternative to using dd because it only targets specific signatures rather than blindly overwriting the entire device. It avoids accidentally corrupting data outside of the signature area. It is designed to work on block devices, but can be used with other files containing metadata.
CAVEATS
Using wipefs on a mounted device can lead to data loss if not used carefully and with the -f flag. Ensure you understand the consequences before forcing operations.
EXIT STATUS
wipefs returns 0 on success. A non-zero exit status indicates an error.
HISTORY
wipefs was developed as part of the util-linux package. It has become a standard tool for managing device metadata, especially when preparing disks for new filesystems or resolving device detection issues. Its usage has increased as file systems and partition tables have become more complex, requiring more targeted methods for removing signatures.
SEE ALSO
AUTHOR
Karel Zak