WIPEFS(8)

๐Ÿ’… WIPEFS(8) โ€” the manual page, but make it cute

okay bestie, sit down, hydrate, because we're about to talk about wipefs from the System Administration corner of the util-linux universe. she erases signatures. she does NOT erase your data. she's precise, she's iconic, and she's about to become your roman empire. ๐ŸŽ€


โœจ NAME โœจ

wipefs โ€” wipe a signature from a device ๐Ÿงš


๐ŸŒธ SYNOPSIS ๐ŸŒธ

wipefs [options] device...

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

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

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So like. wipefs can erase filesystem, raid or partition-table signatures (aka magic strings) off the device you point at, which makes those signatures invisible to libblkid. And the way that this is so important: wipefs does not erase the filesystem itself, and it does not erase any other data from the device. She's just hiding the name tag, not deleting the person. ๐Ÿ’…

When you run it with no options at all, wipefs lists every visible filesystem plus the offsets of their basic signatures. But heads up bestie โ€” the default output is subject to change. So whenever possible you should avoid using default outputs in your scripts, no cap. Always explicitly define the expected columns with --output columns-list in any environment where you need stable output. fr fr.

wipefs calls the BLKRRPART ioctl when it has erased a partition-table signature, to let the kernel know what changed. That ioctl gets called as the last step, and only once all the specified signatures from all the specified devices are already erased. Which is lowkey a superpower: you can use this to wipe content on partition devices and a partition table on a disk device at the same time, like:

wipefs -a /dev/sdc1 /dev/sdc2 /dev/sdc

Now, some filesystems and some partition tables store more magic strings on the device (looking at you, FAT, ZFS, GPT ๐Ÿ‘€). The wipefs command (since v2.31) lists all the offsets where magic strings have been detected. She's thorough, she's observant, she ate. ๐Ÿ”ฅ

When you use the -a option, all magic strings visible to libblkid(3) get erased. In that case wipefs scans the device again after each modification (each erase) until no magic string is found. Relentless. Iconic.

And ngl, one thing you need to know: by default wipefs does not erase nested partition tables on non-whole disk devices. For that you need the --force option. Periodt.

๐Ÿ’– OPTIONS ๐Ÿ’–

  • -a, --all โ€” Erase all available signatures. You can restrict the set of erased signatures with the -t option. When you run this on a partitioned whole-disk device like /dev/sdX, it will erase only the partition tables, not the content of the partitions.
  • -b, --backup[=dir] โ€” Create a signature backup to the file wipefs-<devname>-<offset>.bak in $HOME, or in the directory you pass as the optional argument. More deets in the EXAMPLE section below. ๐Ÿซถ
  • -f, --force โ€” Force erasure, even if the filesystem is mounted. This is also required in order to erase a nested partition-table signature on a non-whole disk device.
  • -J, --json โ€” Use JSON output format. โœจ
  • --lock[=mode] โ€” Use an exclusive BSD lock for the device or file that is being operated upon. The optional mode argument can be yes (1), no (0), or nonblock. If you omit the mode argument, it defaults to yes. This option overrides the environment variable $LOCK_BLOCK_DEVICE. The default is to not use any lock at all, but using a lock is recommended to avoid collisions with systemd-udevd(8) or other tools. (protect your peace, bestie ๐Ÿ’œ)
  • -i, --noheadings โ€” Do not print a header line.
  • -O, --output list โ€” Specify which output columns to print. Use --help to get a list of all supported columns.
  • -n, --no-act โ€” Causes everything to be done except for the write(2) call. (so, like, the whole vibe without the commitment ๐Ÿ™ˆ)
  • -o, --offset offset โ€” Specify the location (in bytes) of the signature which should be erased from the device. The offset number may include a "0x" prefix; then the number will be interpreted as a hex value. It is possible to specify multiple -o options.

The offset argument may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so 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.

  • -p, --parsable โ€” Print out in parsable instead of printable format. Encode all potentially unsafe characters of a string to the corresponding hex value prefixed by '\x'.
  • -q, --quiet โ€” Suppress any messages after a successful signature wipe. ๐Ÿคซ
  • -t, --types list โ€” Limit the set of printed or erased signatures. More than one type may be specified in a comma-separated list. The list, or individual types, can be prefixed with 'no' to specify the types on which no action should be taken. For more details see mount(8).
  • -h, --help โ€” Display help text and exit.
  • -V, --version โ€” Display version and exit.

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

  • LIBBLKID_DEBUG=all โ€” enables libblkid(3) debug output.
  • LOCK_BLOCK_DEVICE=<mode> โ€” use exclusive BSD lock. The mode is "1" or "0". See --lock for more details.
  • LIBSMARTCOLS_DEBUG=all โ€” enables libsmartcols debug output.
  • LIBSMARTCOLS_DEBUG_PADDING=on โ€” use visible padding characters.
  • LIBSMARTCOLS_JSON=compact|lines โ€” Controls JSON output format when using --json. Supported values are compact for JSON output with minimal whitespace, and lines for JSON Lines format (one JSON object per line). If unset or set to any other value, pretty-printed JSON is used.

๐Ÿ“ EXAMPLES ๐Ÿ“

  • wipefs /dev/sda* โ€” Prints information about sda and all partitions on sda.
  • wipefs --all --backup /dev/sdb โ€” Erases all signatures from the device /dev/sdb and creates a signature backup file ~/wipefs-sdb-<offset>.bak for each signature.
dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$((0x00000438)) bs=1 conv=notrunc
  • That last one restores an ext2 signature from the backup file ~/wipefs-sdb-0x00000438.bak. (she can put it back, bestie, she keeps receipts ๐Ÿ’–)

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Karel Zak <kzak@redhat.com> โ€” the blueprint, the moment, the main character of this whole page.


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

blkid(8), findfs(8)


๐Ÿ’€ REPORTING BUGS ๐Ÿ’€

For bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>.


โญ AVAILABILITY โญ

The wipefs command is part of the util-linux package which can be downloaded from the Linux Kernel Archive at <https://www.kernel.org/pub/linux/utils/util-linux/>.


and that's the whole page, bestie โ€” this diva is living her best life as part of util-linux 2.42.4, dated 2026-09-21, and she stays slaying in section 8 of the manual. no cap, go wipe responsibly. ๐Ÿ’…โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from
  • arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms