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 defaultwipefsdoes not erase nested partition tables on non-whole disk devices. For that you need the--forceoption. Periodt.
๐ OPTIONS ๐
-a,--allโ Erase all available signatures. You can restrict the set of erased signatures with the-toption. 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 filewipefs-<devname>-<offset>.bakin$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 beyes(1),no(0), ornonblock. If you omit the mode argument, it defaults toyes. 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 withsystemd-udevd(8)or other tools. (protect your peace, bestie ๐)-i,--noheadingsโ Do not print a header line.-O,--outputlist โ Specify which output columns to print. Use--helpto get a list of all supported columns.-n,--no-actโ Causes everything to be done except for thewrite(2)call. (so, like, the whole vibe without the commitment ๐)-o,--offsetoffset โ 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-ooptions.
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,--typeslist โ 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 seemount(8).-h,--helpโ Display help text and exit.-V,--versionโ Display version and exit.
๐ ENVIRONMENT ๐
LIBBLKID_DEBUG=allโ enableslibblkid(3)debug output.LOCK_BLOCK_DEVICE=<mode>โ use exclusive BSD lock. The mode is"1"or"0". See--lockfor 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 arecompactfor JSON output with minimal whitespace, andlinesfor 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 aboutsdaand all partitions onsda.wipefs --all --backup /dev/sdbโ Erases all signatures from the device/dev/sdband creates a signature backup file~/wipefs-sdb-<offset>.bakfor 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 ๐ฅ
๐ 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