wipefs erases the magic strings that identify a filesystem, RAID member, or partition table, so tools such as blkid and the kernel no longer recognise them. It does not erase the filesystem contents or the rest of the data. It is part of util-linux.
sudo wipefs /dev/sdX # list detected signatures and offsets (changes nothing)
sudo wipefs -a /dev/sdX # erase all signatures (destructive)
sudo wipefs --all --force /dev/sdX1 # also needed on a partition to remove a nested partition table
sudo wipefs -o 0x438 /dev/sdX1 # erase only the signature at one offset
Notes:
- With no options it lists every visible signature. The default output format may change between versions, so in scripts select columns explicitly:
wipefs --output DEVICE,OFFSET,TYPE,UUID /dev/sdX. - After erasing a partition-table signature, wipefs asks the kernel to re-read the table.
- Some formats keep several signatures (FAT, ZFS, GPT has backup headers).
-arescans and removes them all. - Use it before reusing a disk from RAID/LVM so old metadata doesn't resurrect. For genuine data destruction see shred/scrub.