*wipe file system*
The `wipefs` utility lists or erases _filesystem / RAID / partition-table signatures_ on a block device **without overwriting the bulk data**.
| Command | Flag | Description | Example |
| -------- | --------------- | ------------------------------------------------------------------------------- | --------------------------------- |
| `wipefs` | `(no flag)` | Show all signatures found on the device | `sudo wipefs /dev/sdb` |
| | `-a`/`--all` | Erase **all** detected signatures on the given device | `sudo wipefs -a /dev/sdb` |
| | `-o <offset>` | Erase only the signature at the specified byte offset (from a previous listing) | `sudo wipefs -o 0x10000 /dev/sdb` |
| | `-n`/`--no-act` | Dry-run: print what _would_ be wiped, but don’t modify anything | `sudo wipefs -a -n /dev/sdb` |
| | `-f` | Force wiping if the device is read-only (attempts a remount-rw first) | `sudo wipefs -a -f /dev/sdb` |
| | `-q` | Quiet; suppress non-error output (pair with scripting) | `sudo wipefs -q -a /dev/sdb` |
>[!warning]
>Can leave behind GPT debris that confuses partitioning tools, e.g. because it does not remove nested partition tables.
---
The `sgdisk` utility creates, inspects, erases [[Understanding Disk Partitions|GPT partitions-table metadata]] without touhcing the actual data on the block device.
|Command|Flag / Syntax|Description|Example|
|---|---|---|---|
|`sgdisk`|**`-p`**|Print the current GPT, including partition numbers, types, GUIDs, and names (read‑only).|`sudo sgdisk -p /dev/sda`|
||**`-o`**|Create a _brand‑new_ (empty) GPT, leaving the disk GUID unchanged. Destroys any existing table but not the payload data.|`sudo sgdisk -o /dev/sda`|
||**`-Z`**, **`--zap-all`**|Wipe **both** the primary _and_ backup GPT headers _and_ the protective MBR—the most thorough “blank slate”.|`sudo sgdisk --zap-all /dev/sda`|
||**`-n <num>:<start>:<end>`**|Create partition **num** covering the `<start>`–`<end>` LBAs (you can use `0` for “next free” and `+sizeM/G` shorthands).|`sudo sgdisk -n 1:0:+30G /dev/sda`|
||**`-d <num>`**|Delete the specified partition entry (metadata only).|`sudo sgdisk -d 1 /dev/sda`|
||**`-b <file>`** / **`-l <file>`**|**Backup** the full GPT to a binary _file_, or **load** (restore) it later.|`sudo sgdisk -b table.bin /dev/sda``sudo sgdisk -l table.bin /dev/sda`|