{
    "content": [
        {
            "type": "text",
            "text": "# wipefs(8) (man)\n\n## TLDR\n\n> Wipe filesystem, raid, or partition-table signatures from a device.\n\n- Display signatures for specified device:\n  `sudo wipefs {{/dev/sdX}}`\n- Wipe all available signature types for a specific device with no recursion into partitions:\n  `sudo wipefs {{-a|--all}} {{/dev/sdX}}`\n- Wipe all available signature types for the device and partitions using a glob pattern:\n  `sudo wipefs {{-a|--all}} {{/dev/sdX}}*`\n- Perform dry run:\n  `sudo wipefs {{-a|--all}} {{-n|--no-act}} {{/dev/sdX}}`\n- Force wipe, even if the filesystem is mounted:\n  `sudo wipefs {{-a|--all}} {{-f|--force}} {{/dev/sdX}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** wipefs - wipe a signature from a device\n\n**Synopsis:** wipefs [options] device...\nwipefs [--backup] -o offset device...\nwipefs [--backup] -a device...\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -a | --all | — | Erase all available signatures. The set of erased signatures can be restricted with the -t option. |\n| -b | --backup | — | Create a signature backup to the file $HOME/wipefs-<devname>-<offset>.bak. For more details see the EXAMPLE section. |\n| -f | --force | — | Force erasure, even if the filesystem is mounted. This is required in order to erase a partition-table signature on a bl |\n| -h | --help | — | Display help text and exit. |\n| -J | --json | — | Use JSON output format. --lock[=mode] Use exclusive BSD lock for device or file it operates. The optional argument mode  |\n| -i | --noheadings | — | Do not print a header line. |\n| -O | --output | — | Specify which output columns to print. Use --help to get a list of all supported columns. |\n| -n | --no-act | — | Causes everything to be done except for the write(2) call. |\n| -o | --offset | — | Specify the location (in bytes) of the signature which should be erased from the device. The offset number may include a |\n| -p | --parsable | — | Print out in parsable instead of printable format. Encode all potentially unsafe characters of a string to the correspon |\n| -q | --quiet | — | Suppress any messages after a successful signature wipe. |\n| -t | --types | — | Limit the set of printed or erased signatures. More than one type may be specified in a comma-separated list. The list o |\n| -V | --version | — | Display version information and exit. |\n\n## Examples\n\n- `wipefs /dev/sda*`\n- `Prints information about sda and all partitions on sda.`\n- `Erases all signatures from the device /dev/sdb and creates a signature backup file`\n- `~/wipefs-sdb-<offset>.bak for each signature.`\n- `Restores an ext2 signature from the backup file ~/wipefs-sdb-0x00000438.bak.`\n\n## See Also\n\n- blkid(8)\n- findfs(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (6 lines)\n- **DESCRIPTION** (26 lines)\n- **OPTIONS** (1 lines) — 13 subsections\n  - -a --all (3 lines)\n  - -b --backup (3 lines)\n  - -f --force (3 lines)\n  - -h --help (2 lines)\n  - -J --json (8 lines)\n  - -i --noheadings (2 lines)\n  - -O --output (2 lines)\n  - -n --no-act (2 lines)\n  - -o --offset (9 lines)\n  - -p --parsable (3 lines)\n  - -q --quiet (2 lines)\n  - -t --types (4 lines)\n  - -V --version (2 lines)\n- **ENVIRONMENT** (6 lines)\n- **EXAMPLES** (3 lines) — 2 subsections\n  - wipefs --all --backup /dev/sdb (3 lines)\n  - dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$0x000004 (2 lines)\n- **AUTHORS** (2 lines)\n- **SEE ALSO** (2 lines)\n- **REPORTING BUGS** (2 lines)\n- **AVAILABILITY** (6 lines)\n\n## Full Content\n\n### NAME\n\nwipefs - wipe a signature from a device\n\n### SYNOPSIS\n\nwipefs [options] device...\n\nwipefs [--backup] -o offset device...\n\nwipefs [--backup] -a device...\n\n### DESCRIPTION\n\nwipefs can erase filesystem, raid or partition-table signatures (magic strings) from the\nspecified device to make the signatures invisible for libblkid. wipefs does not erase the\nfilesystem itself nor any other data from the device.\n\nWhen used without any options, wipefs lists all visible filesystems and the offsets of their\nbasic signatures. The default output is subject to change. So whenever possible, you should\navoid using default outputs in your scripts. Always explicitly define expected columns by\nusing --output columns-list in environments where a stable output is required.\n\nwipefs calls the BLKRRPART ioctl when it has erased a partition-table signature to inform the\nkernel about the change. The ioctl is called as the last step and when all specified\nsignatures from all specified devices are already erased. This feature can be used to wipe\ncontent on partitions devices as well as partition table on a disk device, for example by\nwipefs -a /dev/sdc1 /dev/sdc2 /dev/sdc.\n\nNote that some filesystems and some partition tables store more magic strings on the device\n(e.g., FAT, ZFS, GPT). The wipefs command (since v2.31) lists all the offset where a magic\nstrings have been detected.\n\nWhen option -a is used, all magic strings that are visible for libblkid(3) are erased. In\nthis case the wipefs scans the device again after each modification (erase) until no magic\nstring is found.\n\nNote that by default wipefs does not erase nested partition tables on non-whole disk devices.\nFor this the option --force is required.\n\n### OPTIONS\n\n#### -a --all\n\nErase all available signatures. The set of erased signatures can be restricted with the\n-t option.\n\n#### -b --backup\n\nCreate a signature backup to the file $HOME/wipefs-<devname>-<offset>.bak. For more\ndetails see the EXAMPLE section.\n\n#### -f --force\n\nForce erasure, even if the filesystem is mounted. This is required in order to erase a\npartition-table signature on a block device.\n\n#### -h --help\n\nDisplay help text and exit.\n\n#### -J --json\n\nUse JSON output format.\n\n--lock[=mode]\nUse exclusive BSD lock for device or file it operates. The optional argument mode can be\nyes, no (or 1 and 0) or nonblock. If the mode argument is omitted, it defaults to \"yes\".\nThis option overwrites environment variable $LOCKBLOCKDEVICE. The default is not to use\nany lock at all, but it’s recommended to avoid collisions with udevd or other tools.\n\n#### -i --noheadings\n\nDo not print a header line.\n\n#### -O --output\n\nSpecify which output columns to print. Use --help to get a list of all supported columns.\n\n#### -n --no-act\n\nCauses everything to be done except for the write(2) call.\n\n#### -o --offset\n\nSpecify the location (in bytes) of the signature which should be erased from the device.\nThe offset number may include a \"0x\" prefix; then the number will be interpreted as a hex\nvalue. It is possible to specify multiple -o options.\n\nThe offset argument may be followed by the multiplicative suffixes KiB (=1024), MiB\n(=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the \"iB\" is optional, e.g.,\n\"K\" has the same meaning as \"KiB\"), or the suffixes KB (=1000), MB (=1000*1000), and so\non for GB, TB, PB, EB, ZB and YB.\n\n#### -p --parsable\n\nPrint out in parsable instead of printable format. Encode all potentially unsafe\ncharacters of a string to the corresponding hex value prefixed by '\\x'.\n\n#### -q --quiet\n\nSuppress any messages after a successful signature wipe.\n\n#### -t --types\n\nLimit the set of printed or erased signatures. More than one type may be specified in a\ncomma-separated list. The list or individual types can be prefixed with 'no' to specify\nthe types on which no action should be taken. For more details see mount(8).\n\n#### -V --version\n\nDisplay version information and exit.\n\n### ENVIRONMENT\n\nLIBBLKIDDEBUG=all\nenables libblkid(3) debug output.\n\nLOCKBLOCKDEVICE=<mode>\nuse exclusive BSD lock. The mode is \"1\" or \"0\". See --lock for more details.\n\n### EXAMPLES\n\nwipefs /dev/sda*\nPrints information about sda and all partitions on sda.\n\n#### wipefs --all --backup /dev/sdb\n\nErases all signatures from the device /dev/sdb and creates a signature backup file\n~/wipefs-sdb-<offset>.bak for each signature.\n\n#### dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$0x00000438 bs=1 conv=notrunc\n\nRestores an ext2 signature from the backup file ~/wipefs-sdb-0x00000438.bak.\n\n### AUTHORS\n\nKarel Zak <kzak@redhat.com>\n\n### SEE ALSO\n\nblkid(8), findfs(8)\n\n### REPORTING BUGS\n\nFor bug reports, use the issue tracker at https://github.com/karelzak/util-linux/issues.\n\n### AVAILABILITY\n\nThe wipefs command is part of the util-linux package which can be downloaded from Linux\nKernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.\n\n\n\nutil-linux 2.37.2                            2021-06-02                                    WIPEFS(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "wipefs",
        "section": "8",
        "mode": "man",
        "summary": "wipefs - wipe a signature from a device",
        "synopsis": "wipefs [options] device...\nwipefs [--backup] -o offset device...\nwipefs [--backup] -a device...",
        "tldr_summary": "Wipe filesystem, raid, or partition-table signatures from a device.",
        "tldr_examples": [
            {
                "description": "Display signatures for specified device",
                "command": "sudo wipefs {{/dev/sdX}}"
            },
            {
                "description": "Wipe all available signature types for a specific device with no recursion into partitions",
                "command": "sudo wipefs {{-a|--all}} {{/dev/sdX}}"
            },
            {
                "description": "Wipe all available signature types for the device and partitions using a glob pattern",
                "command": "sudo wipefs {{-a|--all}} {{/dev/sdX}}*"
            },
            {
                "description": "Perform dry run",
                "command": "sudo wipefs {{-a|--all}} {{-n|--no-act}} {{/dev/sdX}}"
            },
            {
                "description": "Force wipe, even if the filesystem is mounted",
                "command": "sudo wipefs {{-a|--all}} {{-f|--force}} {{/dev/sdX}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-a",
                "long": "--all",
                "arg": null,
                "description": "Erase all available signatures. The set of erased signatures can be restricted with the -t option."
            },
            {
                "flag": "-b",
                "long": "--backup",
                "arg": null,
                "description": "Create a signature backup to the file $HOME/wipefs-<devname>-<offset>.bak. For more details see the EXAMPLE section."
            },
            {
                "flag": "-f",
                "long": "--force",
                "arg": null,
                "description": "Force erasure, even if the filesystem is mounted. This is required in order to erase a partition-table signature on a block device."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help text and exit."
            },
            {
                "flag": "-J",
                "long": "--json",
                "arg": null,
                "description": "Use JSON output format. --lock[=mode] Use exclusive BSD lock for device or file it operates. The optional argument mode can be yes, no (or 1 and 0) or nonblock. If the mode argument is omitted, it defaults to \"yes\". This option overwrites environment variable $LOCKBLOCKDEVICE. The default is not to use any lock at all, but it’s recommended to avoid collisions with udevd or other tools."
            },
            {
                "flag": "-i",
                "long": "--noheadings",
                "arg": null,
                "description": "Do not print a header line."
            },
            {
                "flag": "-O",
                "long": "--output",
                "arg": null,
                "description": "Specify which output columns to print. Use --help to get a list of all supported columns."
            },
            {
                "flag": "-n",
                "long": "--no-act",
                "arg": null,
                "description": "Causes everything to be done except for the write(2) call."
            },
            {
                "flag": "-o",
                "long": "--offset",
                "arg": null,
                "description": "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."
            },
            {
                "flag": "-p",
                "long": "--parsable",
                "arg": null,
                "description": "Print out in parsable instead of printable format. Encode all potentially unsafe characters of a string to the corresponding hex value prefixed by '\\x'."
            },
            {
                "flag": "-q",
                "long": "--quiet",
                "arg": null,
                "description": "Suppress any messages after a successful signature wipe."
            },
            {
                "flag": "-t",
                "long": "--types",
                "arg": null,
                "description": "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)."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information and exit."
            }
        ],
        "examples": [
            "wipefs /dev/sda*",
            "Prints information about sda and all partitions on sda.",
            "Erases all signatures from the device /dev/sdb and creates a signature backup file",
            "~/wipefs-sdb-<offset>.bak for each signature.",
            "Restores an ext2 signature from the backup file ~/wipefs-sdb-0x00000438.bak."
        ],
        "see_also": [
            {
                "name": "blkid",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/blkid/8/json"
            },
            {
                "name": "findfs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/findfs/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-a --all",
                        "lines": 3,
                        "flag": "-a",
                        "long": "--all"
                    },
                    {
                        "name": "-b --backup",
                        "lines": 3,
                        "flag": "-b",
                        "long": "--backup"
                    },
                    {
                        "name": "-f --force",
                        "lines": 3,
                        "flag": "-f",
                        "long": "--force"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-J --json",
                        "lines": 8,
                        "flag": "-J",
                        "long": "--json"
                    },
                    {
                        "name": "-i --noheadings",
                        "lines": 2,
                        "flag": "-i",
                        "long": "--noheadings"
                    },
                    {
                        "name": "-O --output",
                        "lines": 2,
                        "flag": "-O",
                        "long": "--output"
                    },
                    {
                        "name": "-n --no-act",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--no-act"
                    },
                    {
                        "name": "-o --offset",
                        "lines": 9,
                        "flag": "-o",
                        "long": "--offset"
                    },
                    {
                        "name": "-p --parsable",
                        "lines": 3,
                        "flag": "-p",
                        "long": "--parsable"
                    },
                    {
                        "name": "-q --quiet",
                        "lines": 2,
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-t --types",
                        "lines": 4,
                        "flag": "-t",
                        "long": "--types"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 3,
                "subsections": [
                    {
                        "name": "wipefs --all --backup /dev/sdb",
                        "lines": 3
                    },
                    {
                        "name": "dd if=~/wipefs-sdb-0x00000438.bak of=/dev/sdb seek=$0x00000438 bs=1 conv=notrunc",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 6,
                "subsections": []
            }
        ]
    }
}