Linux Storage Metadata

wipefs — erase filesystem signatures from a device

wipefs removes filesystem, RAID, or partition-table signatures from a block device. It does not wipe all data — only the identifying metadata.

What wipefs is good for

Incorrect device selection can destroy critical metadata. Always verify with lsblk before wiping.
wipefs removes signatures only — it is not a secure erase tool.

10 Practical Examples

1) List detected signatures

sudo wipefs /dev/sdX

2) Show detailed output

sudo wipefs -n /dev/sdX

-n = no write (dry run)

3) Remove all signatures

sudo wipefs -a /dev/sdX

4) Remove specific offset

sudo wipefs -o 0x00000100 /dev/sdX

5) Force removal

sudo wipefs -a -f /dev/sdX

6) Wipe partition signature

sudo wipefs -a /dev/sdX1

7) Clear leftover LVM metadata

sudo wipefs -a /dev/sdX
sudo pvcreate /dev/sdX

8) Clear RAID signature

sudo wipefs -a /dev/sdX

Useful before re-adding disk to mdadm array.

9) Combine with dd (stronger wipe of first blocks)

sudo dd if=/dev/zero of=/dev/sdX bs=1M count=10

Overwrites initial blocks (more destructive).

10) Verify clean device

sudo wipefs /dev/sdX
lsblk -f

Notes & Gotchas