wipefs(8)
Wipe filesystem, raid, and partition-table signatures from a device.
Synopsis
wipefs [options] device...Description
wipefs erases filesystem, raid, and partition-table signatures (magic bytes) from the specified device(s) to make filesystems invisible to libblkid. It does not erase the filesystem data itself, only the identifying headers that allow the system to recognize what type of filesystem exists.
This is useful for removing stale or duplicate filesystem signatures before creating new partitions, or for preventing a device from being auto-mounted based on old signatures. By default, wipefs shows what would be erased without making changes.
Use the -a flag to actually wipe the signatures, or -o to target specific offsets.
Common options
| Flag | What it does |
|---|---|
-a, --all | Erase all recognized signatures (default is dry-run, shows what would be wiped) |
-b, --backup | Create backup files of erased signatures in the current directory |
-f, --force | Force erasure even if device is mounted or in use |
-n, --no-act | Show what would be erased without actually wiping (default behavior) |
-o, --offset offset | Wipe only the signature at the specified offset in bytes |
-p, --parsable | Output in machine-readable (parsable) format |
-q, --quiet | Suppress output (useful for scripts) |
-t, --types list | Limit wiping to specified signature types (e.g., filesystem,raid,partitiontable) |
Examples
Show all signatures found on /dev/sda1 without erasing them (dry-run)
wipefs /dev/sda1Erase all filesystem signatures from /dev/sda1 to make it invisible to libblkid
wipefs -a /dev/sda1Wipe all signatures from /dev/sdb and backup erased data to current directory
wipefs -b -a /dev/sdbShow only filesystem signatures on /dev/sdc1, ignoring raid and partition table signatures
wipefs -t filesystem /dev/sdc1Erase the signature at offset 0 bytes on /dev/sdd
wipefs -o 0 -a /dev/sddForce wipe signatures on /dev/sde1 even if it's mounted
wipefs -f -a /dev/sde1